Create a Random String in PHP

$uniqueID = “”;
$max = 10; // length of string to create
$cs = “0123456789abcdefghijklmnopqrstuvwxyz”;
$uniqueID = “”;
for( $i=0; $i<$max; $i++ ){ $uniqueID .= $cs[rand(0,strlen($cs))]; }

Tags:

Comments are closed.