Hi,
I want to create a random figure between 1 and 9999, but if it's under 4 chars long, I want it to add preceeding zeros (e.g. 0039).
I tried :
$conduit_random = ("%04d",int(rand(9999)));and although it doesn't give an error it doesn't work either! :(
Is it possible to do it this way or have I got the wrong end of the stick?
Cheers!
In reply to Formatting randomised data by Manawydan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |