par
yaug » 27 nov. 2008, 19:31
Déja..
Pense à mettre un titre qui puisse nous aider à t'aider
Un titre plus explicite.
Quand à ton probleme.
Si tu as un nombre relativement petit d'image
tu peux faire quelque chose dans le genre :
$imgs = array(
0 => 'image1.jpg',
1 => 'image2.jpg',
2 => 'image3.jpg',
3 => 'image4.jpg',
4 => 'image5.jpg',
);
$img = $imgs[mt_rand(0, count($imgs) - 1 ) ];
echo '<img src="$img" />";
Déja..
Pense à mettre un titre qui puisse nous aider à t'aider
Un titre plus explicite.
Quand à ton probleme.
Si tu as un nombre relativement petit d'image
tu peux faire quelque chose dans le genre :
[php]
$imgs = array(
0 => 'image1.jpg',
1 => 'image2.jpg',
2 => 'image3.jpg',
3 => 'image4.jpg',
4 => 'image5.jpg',
);
$img = $imgs[mt_rand(0, count($imgs) - 1 ) ];
echo '<img src="$img" />";
[/php]