in reply to Help with number conversion

sprintf is your friend.

You want:

$fixed = sprintf('%03d', $num);
Hope this helps...

gav^