I want to calculate days between 'today' and a given date, $m->status_date
.
In the code below, the first part with text1
and text2
works well, but the second part with text3
and text4
doesn't work.
How should I change my code? Here is how I have my code currently:
<?=($m->status_date!='0000-00-00'
? "text1 ".$m->st_cnt.
:"text2")
?>
<?=(strtotime('now')-strtotime($m->status_date)>=120
&& $m->status_date!='0000-00-00'
? "text3":"text4")
?>