mady Posted June 16, 2009 Share Posted June 16, 2009 Hey I'm trying to change this unixtime '1245185052' into H:M A.M format, but I get a blank output why? where '.$playedat[0].' = 1245185052 <?php echo " date("H:i a" '.$playedat[0].')" ?> Link to comment https://forums.phpfreaks.com/topic/162451-converting-unixtime-to-date-format/ Share on other sites More sharing options...
Maq Posted June 16, 2009 Share Posted June 16, 2009 Your syntax is off. Missing a comma, no colon, and extra quotes. echo date("H:i a", $playedat[0]); ?> Link to comment https://forums.phpfreaks.com/topic/162451-converting-unixtime-to-date-format/#findComment-857474 Share on other sites More sharing options...
mady Posted June 16, 2009 Author Share Posted June 16, 2009 nopes no cigars Link to comment https://forums.phpfreaks.com/topic/162451-converting-unixtime-to-date-format/#findComment-857484 Share on other sites More sharing options...
Maq Posted June 16, 2009 Share Posted June 16, 2009 This works: $playedat[0] = 1245185052; echo date("H:i a", $playedat[0]); ?> Link to comment https://forums.phpfreaks.com/topic/162451-converting-unixtime-to-date-format/#findComment-857488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.