cronoklee Posted May 23, 2006 Share Posted May 23, 2006 Hi all,I've got a date column in a database in the format YYYY-DD-MM.I grab the date from the database into a php array and echo it to the page.I am from Ireland, so I would like the date displayed as DAY, DD/MM/YY but it comes up in some crazy inside out way. I'm using the code below:echo date("l d/m/y", $infoarray['date']);I can't for the life of me figure it out. Can anyone help please?Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/10290-mysqlphp-date-display-problems/ Share on other sites More sharing options...
ober Posted May 23, 2006 Share Posted May 23, 2006 echo date("l d/m/y", strtotime($infoarray['date'])); Link to comment https://forums.phpfreaks.com/topic/10290-mysqlphp-date-display-problems/#findComment-38351 Share on other sites More sharing options...
cronoklee Posted May 24, 2006 Author Share Posted May 24, 2006 [!--quoteo(post=376446:date=May 23 2006, 08:27 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 23 2006, 08:27 PM) [snapback]376446[/snapback][/div][div class=\'quotemain\'][!--quotec--]echo date("l d/m/y", strtotime($infoarray['date']));[/quote]Perfect! Got it in one! Thanks a million! Link to comment https://forums.phpfreaks.com/topic/10290-mysqlphp-date-display-problems/#findComment-38565 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.