public function randomStr( $length = 16 )
    {
        $arr = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));

        $str = '';
        $arr_len = count($arr);
        for ($i = 0; $i < $length; $i++)
        {
            $rand = mt_rand(0, $arr_len-1);
            $str.=$arr[$rand];
        }

        return $str;
    }
public function randomStr( $length = 16 )
    {
        $arr = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));

        $str = '';
        $arr_len = count($arr);
        for ($i = 0; $i < $length; $i++)
        {
            $rand = mt_rand(0, $arr_len-1);
            $str.=$arr[$rand];
        }

        return $str;
    }
public function randomStr ( $ length = 16 ) { $ arr = array_merge ( range ( 0 , 9 ) , range ( 'a' , 'z' ) , range ( 'A' , 'Z' ) ) ; $ str = '' ; $ arr_len = count ( $ arr ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ rand = mt_rand ( 0 , $ arr_len - 1 ) ; $ str .= $ arr [ $ rand ] ; } return $ str ; }
generate a random string include uppercase and lowercase letters and numbers
generate a random string include uppercase and lowercase letters and numbers