2012-01-19 23:49:52 0 Comments PHP Boy.Lee

A new method for generate rand string in PHP

A new method for generate rand string in PHP, used chr() function

public static function randomKeys($len){
	$output = '';
	for ($i=0; $i<$len; $i++){
		$output .= chr(mt_rand(33, 126));
	}
	return $output;
}