Welcome Guest, Not a member yet? Register   Sign In
Unique ID problem
#5

(This post was last modified: 06-07-2016, 07:29 PM by Aloghli.)

PHP Code:
function id($suffx ''$length 10) {
        
// return uniqid($suffx);
        
$characters '0123456789';
        
$randomString '';
        for (
$i 0$i $length$i++) {
            
$randomString .= $charactersrand(0strlen($characters) - 1) ];
        }
        return 
$suffx $randomString;
    } 

PHP Code:
id(time());id(date(YmdHis)); 
Reply


Messages In This Thread
Unique ID problem - by Chandini - 06-07-2016, 10:19 AM
RE: Unique ID problem - by skunkbad - 06-07-2016, 10:29 AM
RE: Unique ID problem - by cartalot - 06-07-2016, 12:54 PM
RE: Unique ID problem - by Josh Davidson - 06-07-2016, 05:00 PM
RE: Unique ID problem - by Aloghli - 06-07-2016, 07:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB