Kramerica Industries, LLC

Random Image Example in PHP

This PHP script will place a random image on your page.

Random image C

<?php
switch (rand(1,4)) {
case 1:  echo'<img src="A.jpg" alt="Random image A">';	break;
case 2:  echo'<img src="B.jpg" alt="Random image B">';	break;
case 3:  echo'<img src="C.jpg" alt="Random image C">';	break;
case 4:  echo'<img src="D.jpg" alt="Random image D">';	break;
}
?>