i have tried this code which works fine on my testing server, but when i upload to the server which runs php 4.2.2, it only returns the same image. what could be causing this?
thanks in advance
<html>
<head>
<title>Test Array</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
$images = array('images/layout/title01.gif', 'images/layout/title02.gif',
'images/layout/title03.gif', 'images/layout/title04.gif',
'images/layout/title05.gif', 'images/layout/title06.gif',
'images/layout/title07.gif','images/layout/title08.gif');
srand ((float)microtime()*1000000);
shuffle ($images);
?>
</head>
<body>
<?php
$i = 1;
echo '<img src ="'.$images[$i].'" >';
?>
</body>
</html>