phpbar.de logo

Mailinglisten-Archive

Re: [php] Random Buchstaben...
Archiv Mailingliste php_(at)_infosoc.uni-koeln.de

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [php] Random Buchstaben...



On Tue, 20 Apr 1999 12:34:48 +0200, Alexander Meis wrote:

>gibts ne möglichkeit fuer randimbuchstaben...

function FncRandomString($len) 
{
	srand(date("s"));

$possible="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	$str="";
	while(strlen($str)<$len) 
	{	$str.=substr($possible,(rand()%(strlen($possible))),1);
	}
	return($str);
} 
-- 
www.living-source.com ~ ak_(at)_living-source.com
Freiburg: 0761-152580 ~ Hamburg:040-39904183

Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive