php3-list | 199901
Date: 01/31/99
- Next message: Z.Nijmeyers <email protected>: "[PHP3] RE: problems with image calls"
- Previous message: Lars Torben Wilson: "Re: [PHP3] HTTP referer"
- Next in thread: Mark Musone: "Re: [PHP3] strange problem with rand()"
- Reply: Mark Musone: "Re: [PHP3] strange problem with rand()"
- Maybe reply: Luke Welling: "Re: [PHP3] strange problem with rand()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hi all,
I am using PHP on FreeBSD (i am a Pair networks client)
and i have a strange problem, look at this:
$images = array("batman","indian","mermaid");
/* images array made shorter, doesn't seem to make a difference to me */
$count = count($images);
srand((double)microtime()*1000000); //seeding the random generator
$i=rand(0,$count); //picking a value between 0 and the length of $images
----After this I just do something like: <img src="<? print $images[i]; ?>.gif"
After this a random image from the array should appear. But all i get is HUGE values for $i like 1543769270 or 470447945 (i know this because I print $i in my php3 file)... Anybody know what's going on?
Byebye, Hans
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Z.Nijmeyers <email protected>: "[PHP3] RE: problems with image calls"
- Previous message: Lars Torben Wilson: "Re: [PHP3] HTTP referer"
- Next in thread: Mark Musone: "Re: [PHP3] strange problem with rand()"
- Reply: Mark Musone: "Re: [PHP3] strange problem with rand()"
- Maybe reply: Luke Welling: "Re: [PHP3] strange problem with rand()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

