For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
function photorandom()
{
$photo = array("www.google.nl" => "1.jpg", "www.bing.com" => "2.jpg", "3.jpg", "4.jpg");
// seed ran gen
srand(time());
// randomize the order in the array
shuffle($photo);
return $photo[0];
}
Lou
Say what you will about Sisyphus. He always has work.
I threw in some variable dumps (exports). You can better see what's going on. If you look at the array, there is only $photo[0] and $photo[1] because the other values have keys instead of array indexes, so $photo[2] and $photo[3] are NULL.