Generate Random Text Using Text and Numbers 24th November 201810th October 2019 Full To TechPHPLeave a Comment on Generate Random Text Using Text and Numbers 45 PHP $str = ""; $characters = array_merge(range('A','Z'), range('0','9')); $max = count($characters) - 1; for ($i = 0; $i < 10; $i++) { $rand = mt_rand(0, $max); $str .= $characters[$rand]; } echo $str." "; 123456789 $str = "";$characters = array_merge(range('A','Z'), range('0','9'));$max = count($characters) - 1;for ($i = 0; $i < 10; $i++) {$rand = mt_rand(0, $max);$str .= $characters[$rand];}echo $str.""; Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Like this:Like Loading...