05-10-2011, 11:33 PM
I wanted to code up something quick to learn some new functions on PHP. I came across the 'rand' function and this is what happened:
I know it's sloppy, I did this quick.
<html>
<body>
<?php //Random number generator WOOOO
//Generate the numbers
$n1 = rand (1, 99);
$n2 = rand (1, 99);
$n3 = rand (1, 99);
//Outcome
print "<p>Your Lucky numbers are...<br />
$n1<br />
$n2<br />
$n3</p>";
?>
</html>
I know it's sloppy, I did this quick.
<html>
<body>
<?php //Random number generator WOOOO
//Generate the numbers
$n1 = rand (1, 99);
$n2 = rand (1, 99);
$n3 = rand (1, 99);
//Outcome
print "<p>Your Lucky numbers are...<br />
$n1<br />
$n2<br />
$n3</p>";
?>
</html>