Function that Loads a Random Image from an Array I'm new to PHP and had to put together a function that loads a random image from an array (it works fine). Here's what I came up with. Could it be improved? Any feedback would be appreciated.

&lt;?php
function displayRandomPhotoArea() {
    $photoAreas = array("imageURL1", "imageURL2", "imageURL3", "imageURL4", "imageURL5");

    $randomNumber = rand(0, (count($photoAreas) - 1));

    echo '&lt;img src="' . $photoAreas[$randomNumber] . '" width="725" height="194"&gt;';
}

// Display a random image here
displayRandomPhotoArea();
?&gt;
Try to use array_rand function, code will look cleaner: 

&lt;?php
function displayRandomPhotoArea() 
{
    $photoAreas = array("imageURL1", "imageURL2", "imageURL3", "imageURL4", "imageURL5");

    $randomNumber = array_rand($photoAreas);
    $randomImage = $photoAreas[$randomNumber];

    echo "&lt;img src=\"$randomImage\" width=\"725\" height=\"194\"&gt;";
}

displayRandomPhotoArea();
?&gt;