doa24uk Posted September 25, 2007 Share Posted September 25, 2007 Hi guys, How can I remove the leading zeros from my code numbers (always 13 digits long)? 0000000000001 0000000000938 0000000001053 0000000041544 Many thanks DoA Quote Link to comment https://forums.phpfreaks.com/topic/70606-solved-remove-certain-number-of-leading-zeros/ Share on other sites More sharing options...
Lumio Posted September 25, 2007 Share Posted September 25, 2007 ltrim('0000000000001', '0'); or $d = '0000000000001'; ltrim($d, '0'); Quote Link to comment https://forums.phpfreaks.com/topic/70606-solved-remove-certain-number-of-leading-zeros/#findComment-354793 Share on other sites More sharing options...
doa24uk Posted September 25, 2007 Author Share Posted September 25, 2007 Many thanks. Topic Solved Quote Link to comment https://forums.phpfreaks.com/topic/70606-solved-remove-certain-number-of-leading-zeros/#findComment-354797 Share on other sites More sharing options...
Lumio Posted September 25, 2007 Share Posted September 25, 2007 click "Topic Solved" Quote Link to comment https://forums.phpfreaks.com/topic/70606-solved-remove-certain-number-of-leading-zeros/#findComment-354800 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.