/ Published in: PHP

I didn't make this, I just found it online and found it really useful for generating unique IDs for stuff.
Have fun using this.
Have fun using this.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function genRandomString($length) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $string = ''; for ($p = 0; $p < $length; $p++) { } return $string; } ////////////////////////////////////// // Example : // // // // echo genRandomString(rand(3,7)); // // // // Could Print Out: Ac1dF // //////////////////////////////////////
Comments
