hi guys, i am having a bit of bother checking date in database against date var i have in my script. Basically i want to check the date in the row and if it's a day earlier then display "Yesterday" else display "Today".
In by database the dates are stored in a date field "Y-m-d"
and in my script
$day = date("d")-1;
$yesterday = date("Y-m-").$day;
This would seem to strip the 0 off of 07 so screws up my check. I think i am missing something simple. Can someone point me in the right direction please.
Thanks
Paul