PHP date help

I am trying to get the following to work but i cannot.

I am using
[php]function message($day,$time,$user) {
$tabla = mysql_query(“SELECT * FROM events WHERE day=’$day’ and time=’$time’ and user=’$user’”);
$row = mysql_fetch_array($tabla);
return $row[‘message’]; }[/php]

[php]echo message(‘December 31st, 2011’,800,$user1);[/php]
The above returns what i want with no problem.

However this does not work:
[php]message(date(‘F jS, Y’,$usetime+(($t-1)*86400)),800,"$user1");[/php]

date(‘F jS, Y’,$usetime+(($t-1)*86400)) returns December 31st, 2011

So i dont know what the problem is

Thank you for the help

Can you get your message function to output the query before it processes it and post it here?

Sponsor our Newsletter | Privacy Policy | Terms of Service