I need to generate a string of numbers that are 20 digits long. Starting with 20 zeros ending with 20 nines. I can do this easily by running a normal rand(0,9) through a for loop.
for ($i = 0; $i < 20; $i++)
{
$rng_salt .= rand(0,9);
}
But the loop is a lengthy process so to speak. I would like to try and figure out how to do this same thing with mt_rand(00000000000000000000, 99999999999999999999) or something similar. Preferably I’d like to do away with the loop and break it down to a single line if at all possible.
You can still have the whole loop in one line
You can also play around
What about doing some shuffle