i have a timestamp in mysql, i call it into a variable called: $last (it is in unix timestamp format)
i want to see if $last occured within 'today' (midnight to midnight)... what would the conditional look like to check that...
if (date("z",$last)==date("z",time()) and date("Y",$last)==date("Y",time())) { print "it was today"; } else { print "it was not today"; }
I'd probably condense that down a bit to:
if(date('Ymd', $last) == date('Ymd')) { // same } else { // different }
perfect.. graci!