Code: Select all
$len=0;
$while ($len<8)
{
$value.=chr(mt_rand(33,47));
$len++;
}
echo $value;
33 to 47,60 to 64,91 to 96,123 to 126.
the above values are the ascii values of punctuation.
In the following line(also shown in the above code),how do i include all the rest of the values
$value.=chr(mt_rand(33,47));
i.e i need to generate at one time,any one of these values randomly
$value=chr(mt_rand(33,47));
$value=chr(mt_rand(60,64));
$value=chr(mt_rand(91,96));
$value=chr(mt_rand(123,126));
pls help and thanks for any assistance.if any other clarifications required ,pls reply.