/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $images = array(1=>1, 2, 3, 4, 5); for ($i= 0; $i < 3; $i++) { $nr[$i] = array_rand($images,1); unset($images[$nr[$i]]); ?> <img src="http://images_path/imagename_<?php echo $nr[$i] ?>.png" width='image_width' height='image_height' alt='image_alt_text' /> <?php } ?>