Error If condition not working for 29 February in php , when i set date 29 feb it show first conditon true1
Clash Royale CLAN TAG #URR8PPP Error If condition not working for 29 February in php , when i set date 29 feb it show first conditon true1 problem between 28 and 29 February, please change date and see result $cmncdate = '2019-02-29'; $time=strtotime($cmncdate); $day=date("d",$time); $mnth=date("m",$time); if ($day>=1 AND $day<11) $nday = '10'; $newDate = date("Y-m-$nday", strtotime($cmncdate)); echo $newDate; elseif ($day>10 AND $day<21) $nday = '20'; $newDate = date("Y-m-$nday", strtotime($cmncdate)); echo $newDate; elseif ($day>20 AND $day<31 AND $mnth!=2) $nday = '30'; $newDate = date("Y-m-$nday", strtotime($cmncdate)); echo $newDate; elseif ($day>20 AND $day<29 AND $mnth=2) $nday = '28'; $newDate = date("Y-m-$nday", strtotime($cmncdate)); echo $newDate; elseif ($day=29 AND $mnth=2) $nday = '29'; $newDate = date("Y-m-$nday", strto...