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


Messages In This Thread
PHP: A Cool Little Thing For a Site - by Chaos - 05-10-2011, 11:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)