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? 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 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. 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
Archived
This topic is now archived and is closed to further replies.