Jump to content

[SOLVED] Left padding 0's


Ninjakreborn

Recommended Posts

If I have a random set of numbers (perhaps some characters).

I need to take.

$variable = 'whatever';

And pad the variable with 0's up to 10.  When it's over with if they variable has below 10 characters, it need's to add zero's up until it has a total of 10 characters.  THe 0's need to add on the left hand side, any advice?

Link to comment
https://forums.phpfreaks.com/topic/76651-solved-left-padding-0s/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.