jimbowvu80s Posted January 7, 2011 Share Posted January 7, 2011 I'm trying to figure out how to format a variable. I am listing the contents of a directory from an array and I trying to format the date field to be like - Jan 07, 2011 01:35 PM. When I try this format I get a 500 error message. <td width="'.$width_of_dates_column.'">'.$files("M d Y h:i:s A", filemtime['date'])[$key].'</td></tr>'; Is is possible to format the date after it's been put into the array or does it have to be done while it's being processed. Not sure if you need more code to determine the formatting. Please let me know if you do. Thank you. Link to comment https://forums.phpfreaks.com/topic/223727-date-formating/ Share on other sites More sharing options...
requinix Posted January 7, 2011 Share Posted January 7, 2011 Your syntax... It's... I don't even know what to call it. "Wrong" is an understatement. Stop what you're doing and go relearn the basics of PHP. ''.date("M d Y h:i:s A", filemtime($files[$key])).'' Link to comment https://forums.phpfreaks.com/topic/223727-date-formating/#findComment-1156471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.