I don't understand why I can't get a random quote everytime I call $quotes[$r]???
It shows the same quote... I refresh it shows 2 more of the same... I want it to show to different quotes on every refresh
Is there anyway I can set the random array to reset everytime it's echo into a simple var or something??? This is driving me crazy!
<?php
$quotes[] = 'first quote';
$quotes[] = 'second quote';
$quotes[] = 'etc...';
srand ((double) microtime() * 1000000);
$r = rand(0,count($quotes)-1);
echo ($quotes[$r]);
echo ($quotes[$r]);
?>