how to change image refresh your page in PHP

In this article php coding when page refresh image change.
Using switch case create a random number and give every case an image and when you refresh page image change automatically.

Here is code....
srand( microtime() * 1000000 );
$number = rand(1,2);
     case 1: 
     $img = "images/picture1.png";
     case 2: 
     $img = "images/picture2.png";

echo "<img src=images/".$img." />";

Many code for PHP