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. Quote Link to comment 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])).'' Quote Link to comment 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.