PHP: Generate random number and string
Here are code samples to generate random number and strings in PHP. Generate random numbers between 1 and 1000 $num = rand(1,1000); Using mtrand() function for better random number generation $num = mt_rand(1,1000); Generate a unique combination of numbers and letters. Works with PHP5 and higher. $unique = uniqid(); Using md5() and uniqid() function to … Read more