Jump to content

Stripping leading Zeroes in numbers


Auto

Recommended Posts

Hi there,

I'm curious if there is a way to strip leading zeroes from a number? I am making a page to calculate scores from a game, and, when it shows the scores on the "leaderboard" page, it will show numbers below 100 as 05, 020, etc., etc., when it should show 5 or 20.

Any way to do this without having to run a giant if, then statement?

Thanks in advance!
Link to comment
https://forums.phpfreaks.com/topic/35047-stripping-leading-zeroes-in-numbers/
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.