note 62002 modified in function.chr by danbrown
| From: | danbrown@php.net | Date: | Wed, 15 Sep 2010 21:11:09 +0000 |
| Subject: | note 62002 modified in function.chr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172596@lists.php.net to get a copy of this message | ||
I didn't see it here, so here's simple random string generation using char.
<?php
for($i=0; $i<7; $i++){
$random_string .= chr(rand(0,25)+65);
}
echo $random_string;
?>
--was--
I didn't see it here, so here's simple random string generation using char.
for($i=0; $i<7; $i++){
$random_string .= chr(rand(0,25)+65);
}
echo $random_string;
http://php.net/manual/en/function.chr.php