realjumper Posted September 19, 2007 Share Posted September 19, 2007 Hi, I'm sure this has been answered before but I can't find it. Also, I had this figured out a year or two back but I didn't note it down. Sorry I have a start time and an end time (of a given event) stored in my db as varchar. So, a 1.30 start time looks like 01.30 in the db. Obviously this echos out as 01.30. How do I strip the leading zero's off? I'm looking at str_replace, but I caan't get it right. Thanks :-) Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 19, 2007 Share Posted September 19, 2007 number_format might help Quote Link to comment Share on other sites More sharing options...
Barand Posted September 19, 2007 Share Posted September 19, 2007 or www.php.net/ltrim Quote Link to comment Share on other sites More sharing options...
realjumper Posted September 19, 2007 Author Share Posted September 19, 2007 Thank you both...ltrim did the job :-) Quote Link to comment 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.