Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

random string number generator in php codeigniter

 // RANDOM NUMBER GENERATOR
function random($length_of_string) {
        // String of all alphanumeric character
        $str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';

        // Shufle the $str_result and returns substring
        // of specified length
        return substr(str_shuffle($str_result), 0, $length_of_string);
    }
 
PREVIOUS NEXT
Tagged: #random #string #number #generator #php #codeigniter
ADD COMMENT
Topic
Name
1+9 =