I want to generate a random string of 50 characters string using Letters, Numbers and Special Symbols.
Below Code is working Fine for me.
But the issue is that if I add Special Symbol <
I does not work as it should be
Kindly help.
<?php
$complete_string = NULL;
$generated_string = NULL;
$generated_string_length = 50;
$lower_case_string = 'abcdefghijklmnopqrstuvwxyz';
$upper_case_string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$numbers_string = '0123456789';
$special_symbols_string = ',./?;:"[]{}+=-_)(*&^%$#@!~`>'; // All Special Symbols without <
$complete_string = $complete_string.$lower_case_string.$upper_case_string.$numbers_string.$special_symbols_string;
$generated_string = substr(str_shuffle(str_repeat($complete_string, ceil($generated_string_length/strlen($complete_string)) )),1,$generated_string_length);
echo $generated_string;
?>