jeffery1493 Posted January 18, 2007 Share Posted January 18, 2007 Hi All,I'm sure this sounds like a dumb question, but I have been struggling with trying to format an incoming date, from a PHP MySQL table read.The date data from the table was put in this engenius format (example):1167686619 My code is pulling rows from an inner join: while ($row = mysql_fetch_array($result)) { echo "<TR>"; echo "<TD align='center' width='10%'> ", $row['0']," </TD><TD width='10%'> ", $row['1']," </TD><TD width='10%'> ", $row['2']," </TD><TD width='10%' align='center'> $", $row['4'],".00 </TD><TD align='center' width='10%'> ", $row['5']," </TD>"; echo "</TR>"; }$row['5'] is the date, coming through as 1167686619. I've visited dozens of webpages, and tried at least ten differnet functions and combinations, but none that say how to format it in this context.I'm sure this is something simple I just can't see................. Quote Link to comment Share on other sites More sharing options...
jeffery1493 Posted January 18, 2007 Author Share Posted January 18, 2007 I FINALLY cracked this one.This is a start. Insert this line above the echo/row[1-5] read:$row['5']=date('j M', row['5']);Time for a drink. :P 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.