I'm trying to get my function to add 1 day to the date I send it ,but I can;t figure out how to match the MySQL formatting. I've currently got:
$result = mysql_query($query);
$lastdate = mysql_result($result, 0, 'date');
$date = strtotime(date("Y-m-d", strtotime($lastdate)) . " +1 day");
I know the $date = line is incorrect somewhere, but I don't understand the function too well. It's being given the date in the format YYYY-mm-dd ($query is just getting the last date in the database), due to how MySQL stores dates.
I'm guessing that using the strtotime function isn't the right thing to do, or I've got the format/idea all wrong.
Thanks for any help, this is annoying me now :(