I'm running a loop through database results if current date is fall betweens the plan from date and plan to date. following is the piece of code to check the date
$currDate = date('Y-m-d');
if($currDate >= $row['periodFrom'] && $currDate <= $row['periodTo']){
echo "current plan is ".$row['title'];
}
database has records of plan from and plan to is
Title😛lan 1
plan From: 2005-11-03
plan To: 2005-12-31
Title: Plan 2
plan from: 2006-01-01
plan to: 2006-03-28
Somehow the code is finding the current plan based on current date between plan from and plan to.
Please help