Jump to content

[SOLVED] str to int 34 -> "0034" leading zeroes


itazev

Recommended Posts

Hey ya!

I searched for leading zeroes php function all the way and I found that it can be done in date functions.

 

but what if I want to list a non-date query from mysql? lets say I have field CODE_NUMBER and it stores 5, 128, 96, 5879 ...

 

is there a function (?) that i can use to make them appear in the html with leading zeroes like:

0005 , 0128 , 0096 , 5879

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/45759-solved-str-to-int-34-0034-leading-zeroes/
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.