Web Development Tips and Tricks

Web Development Tips and Tricks

Monday, December 5, 2011

Generate a random alphanumeric number with php

Copy and paste it between php tag in your php file

$unique_key = substr(md5(rand(0, 1000000)), 0, 10 );
//Print that string
echo $unique_key;

No comments:

Post a Comment