how would i go about automatically adding a zero to the beginning of a four diget number, or two zeros to the beginning of a three diget number, so that 501 would become 00501? I'm sure there is a simple solution to do this...
...where $number holds your number to prepend zero's to. Use sprintf() [uk.php.net] if you want to assign the result to a string rather than print it out.
killroy
8:18 pm on Jan 18, 2004 (gmt 0)
Or use whatevers is PHPs version of LPAD, pad left with 0 to desired length.