note 26342 added to function.rand
| From: | goliath82 at gmx dot at | Date: | Sun, 27 Oct 2002 09:51:57 +0000 |
| Subject: | note 26342 added to function.rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38617@lists.php.net to get a copy of this message | ||
I want to generate a Password with the lenght of 8. That does work, but the Password is everytime
the same! Who can tell me, why this source doesn't work?
$password = "";
for($i=0; $i<8; $i++)
{ $password.=chr(rand(97, 122)); }
--
http://www.php.net/manual/en/function.rand.php
http://master.php.net/manage/user-notes.php?action=edit+26342
http://master.php.net/manage/user-notes.php?action=delete+26342
http://master.php.net/manage/user-notes.php?action=reject+26342