|
Posted by Geoff Berrow on 04/23/06 12:35
Message-ID: <rfmdnWoymrRuqNbZnZ2dnUVZ_tednZ2d@comcast.com> from Jim
Michaels contained the following:
>well, I have one last thing I can do.
More than that. I've used rand() loads of times and not had a problem.
See:http://www.ckdog.co.uk/phpcourse/DICE/DICEGAME.PHP which picks two
random numbers and displays images according to what the number is.
With the code
$num=rand(1,6);
$num2=rand(1,6);
$total=$num+$num2;
$num1 and $num2 are only occasionally the same (as you might expect)
Full code here:-
http://www.ckdog.co.uk/phpcourse/DICE/dicegame.phps
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
[Back to original message]
|