You should make an array of images like that:
<?php
$images = array('img1.jpg', 'img2.jpg', 'img3.jpg');
?>
Then, you just get a random element from the array
<?php
$random_image = array_rand($images);
?>
Then you can go right away displaying the image:
<img src="<?php echo $images[$random_image]; ?>" />
Hope this helps.