note 52131 deleted from function.rand by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:42:52 +0000 |
| Subject: | note 52131 deleted from function.rand by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134414@lists.php.net to get a copy of this message | ||
Note Submitter: jawsper
----
why so complicated?
this works fine for me:
<?php
function randomstring($length) {
$random = rand();
$string = md5($random);
$output = substr($string,$length);
return $output;
}
?>