PHP: A Cool Little Thing For a Site
#1
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>

[Image: chaosthegreat.png]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)