note 21322 added to function.rand

From: Date: Wed, 08 May 2002 12:30:07 +0000
Subject: note 21322 added to function.rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-30330@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 } ?> -- http://www.php.net/manual/en/function.rand.php http://master.php.net/manage/user-notes.php?action=edit+21322 http://master.php.net/manage/user-notes.php?action=delete+21322 http://master.php.net/manage/user-notes.php?action=reject+21322

« previous php.notes (#30330) next »