date() outputting a notice and Thursday January 1970
Posted: Wed Jun 20, 2007 12:16 pm
hello, just wondering if anybody can help me solve a little problem.
i am wanting to output a date from my mysql database as words, like:
wednesday 20th june 2007, but when i use the date function to convert the mysql version, it outputs this:
im not usually that bad at guessing what notices mean but this one i cant.
im guessing its something to do with the mysql.
first of all, here's my code:
when called, the $ticket_reply_date will be a value of:
2007-06-19
so i think it could be to do with the hyphens being there or something.
anybody got an idea why this is hapening?
thanks for any help
i am wanting to output a date from my mysql database as words, like:
wednesday 20th june 2007, but when i use the date function to convert the mysql version, it outputs this:
(i can tell why its jan 1970, because thats what php works off so its defaulting to that)Notice: A non well formed numeric value encountered in /*******/***/client_area/tickets.php on line 104
Date: Thursday January 1970
im not usually that bad at guessing what notices mean but this one i cant.
im guessing its something to do with the mysql.
first of all, here's my code:
Code: Select all
$ticket_get_replys = @mysql_query("SELECT * FROM ticket_replys WHERE ticket_reply_id = '$ticket_id';");
while($ticket_replys = mysql_fetch_array($ticket_get_replys)){
$ticket_reply_time = $ticket_replys['ticket_reply_time'];
$ticket_reply_date = $ticket_replys['ticket_reply_date'];
$ticket_reply_date = date("l F Y","$ticket_reply_date");
$ticket_reply_message = $ticket_replys['ticket_reply'];
echo "Date: $ticket_reply_date
<br />$ticket_reply_message<br />
---------------------------<br />";
}
echo "</p>";when called, the $ticket_reply_date will be a value of:
2007-06-19
so i think it could be to do with the hyphens being there or something.
anybody got an idea why this is hapening?
thanks for any help