FridayRain Posted September 18, 2007 Share Posted September 18, 2007 Like every other blog in the world, I have mine displaying the date and time of each entry. Right now this is what I'm using: echo date('h:ia', strtotime($r[date])); My latest entry's time is displayed as 07:56pm. How do I remove the 0 when the hour is a single digit? Quote Link to comment https://forums.phpfreaks.com/topic/69746-solved-remove-0-from-strtotime/ Share on other sites More sharing options...
micah1701 Posted September 18, 2007 Share Posted September 18, 2007 change the 'h' to a 'g' see http://www.php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/69746-solved-remove-0-from-strtotime/#findComment-350430 Share on other sites More sharing options...
FridayRain Posted September 18, 2007 Author Share Posted September 18, 2007 Ha. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/69746-solved-remove-0-from-strtotime/#findComment-350437 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.