PDO Random Password Function generate random password using GOModel


Get Random Password function generates random string that can be used for variety of purpose, it has given this name because many times, we need to generate a random password for database related operations.

Function Defination

                                void function getRandomPassword($length = 8, $allow_special_character = false) ;

Parameters Details

Details Type Example
$length - length of string int 9
$allow_special_character - whether to allow special characters boolean true/false


                                $GOModel = new GOModel(); //create object of the GOModel class
                                echo $GOModel->getRandomPassword();

More Examples

                                //Example 1
                                 echo $GOModel->getRandomPassword(15, true);


Returns random string