Codeigniter String helper random_string()

Codeigniter String helper random_string()

Syntax:

Random_string(Type,Length)

Parameters:
Type specifies the type of random string to be generated.
alnum – random and alphanumeric mix variables
numeric – random numbers only
nozero – random number of non-zero variables
unique = random value from the md5 encryption. It will have fixed length

Length – Specifies length of the created string.

Return type:
string.

Description:
Used to create random numbers/text.

Example:

echo Random_string("Alnum", 8);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.