That doesn't display what I want it to (images/box_xxxx.png). It displays the actual variable ($img[ $rand ]). +repPHP Code:<?php
$img[0] = "images/box_red.png";
$img[1] = "images/box_blue.png";
$img[2] = "images/box_purple.png";
$img[3] = "images/box_green.png";
$total = count($img) - 1;
$rand = rand(0,$total);
echo '<img src="$img[ $rand ]" border="0"';
?>
(using an edited version L?KE's code)





Reply With Quote







