<?php

$random = rand(0,5); // random # between 0 and 5

// ARRAY = A LIST THAT CONTAINS MULTIPLE OBJECTS

$desc[0] = " tHis is the first shoe ";
$desc[1] = " tHis is the second shoe ";
$desc[2] = " tHis is the third shoe ";
$desc[3] = " tHis is the fourth shoe ";
$desc[4] = " tHis is the fifth shoe ";
$desc[5] = " tHis is the sixth shoe ";

$img[0] = '<img src="img/s0.jpg" width="201" height="241" alt="SILVER" />';
$img[1] = '<img src="img/s1.jpg" width="260" height="164" alt="MP3 SNEAKER" />';
$img[2] = '<img src="img/s2.jpg" width="247" height="204" alt="RED LACE" />';
$img[3] = '<img src="img/s3.jpg" width="259" height="194" alt="SPIKES" />';
$img[4] = '<img src="img/s4.jpg" width="259" height="194" alt="SILVER" />';
$img[5] = '<img src="img/s5.jpg" width="257" height="196" alt="SILVER" />';

?>



/////////

FIRST XAMPLE just with the random number

echo($random);
echo('<br />');
echo('<img src="img/s'.$random.'.jpg" width="100" height="241" alt="SHOES" />');

1
SHOES

SECOND EXAMPLE USING THE VALUES IN THE ARRAYS

<?php

echo($random);
echo('<br />');
echo($img[$random]);
echo('<br />');
echo($desc[$random]);

?>

1
MP3 SNEAKER
tHis is the second shoe