note 21322 rejected from function.rand by sander
| From: | sander@php.net | Date: | Wed, 08 May 2002 12:39:22 +0000 |
| Subject: | note 21322 rejected from function.rand by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30331@lists.php.net to get a copy of this message | ||
A little source to random numbers 1-10 and adding a true/false statement. you have to set the srand.
Prolly useless :) -Yell0w
<?php
$nummer = rand (1, 10);
echo "$nummer";
if ($nummer >= "7") {
echo " is 7 or higher!";
} else {
?>
is lower than 7
<?php
}
?>