Simple title to this post right? I’ve searched this now for days but I have come up with results that are just not what I need.
Here are the details:
I have on page one (lets say) a place where people can select a date range of records from a database they want to view. Upon hitting ok it sends them to a ‘results’ page to view this range.
On this ‘results’ page it has standard php script to display the queried results like so:
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['entry_date'] . "</td>";
echo "</tr>";
}
echo "</table>";
- by the way, the script above i stripped out all the other table data cells that aren’t important…the one displayed is the one i’m trying to figure out how to get to display a standard time stamp.
As seen above, the entry date is displaying as a unix timestamp which is how it’s stored in the database. For example: 1304323005
What would be the syntax to add a conversion in this script to convert the entry date value to display a standard date rather than that unix timestamp?
I’ve tried strtotime() which I used other places in the script like here:
$fromUnix = strtotime($_POST['from']);
but I’ve tried to include this in the table code and it doesn’t seem to work properly.
Any Thoughts?
Thank you!