iandavies
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by iandavies
-
-
[!--quoteo(post=364397:date=Apr 13 2006, 02:26 PM:name=predator12341)--][div class=\'quotetop\']QUOTE(predator12341 @ Apr 13 2006, 02:26 PM) [snapback]364397[/snapback][/div][div class=\'quotemain\'][!--quotec--]
ok man bare wid us for a min or 2 and i will write the code for ya kk (well something along the lines you want anyway)
[/quote]
hi, that would be a bonus, thaks -
Hi,
i am a bit clueless with php. i need to generate 3 unqiue random numbers between 1 and 6. I can use rand(1,6) to get the numbers but not sure how to check if they unique or not. can someone help me please!
thanks -
hi,
the guy who looks after the server must have done soemthing as it works fine now!
thanks for your time! -
I have uploaded the script to the live server and i am testing it like that.
-
Hi,
I have done a little PHP before and now i have to get a site working with it. The guy who administers the server says that PHP is all setup and plesk shows that PHP support is setup on the server.
However, when i run my test.php <?php phpinfo; ?> the browser prompts me to download or save the file. Does this suggest that PHP is not correctly installed?
thanks!
how to generate 3 unqiue random numbers
in PHP Coding Help
Posted
right here you go dude this should be ok
<?
$number = array();
$number[0]=rand(1,6);
$number[1]=rand(1,6);
$number[2]=rand(1,6);
while($number[0] == $number[1] or $number[0] == $number[2] or $number[1] == $number[2])
{
$number[0]=rand(1,6);
$number[1]=rand(1,6);
$number[2]=rand(1,6);
}
echo $number[0];
echo "<br>";
echo $number[1];
echo "<br>";
echo $number[2];
?>
[/quote]
thats great, thanks!