Let me explain the scenario.
I have "Month(Any month from 01 TO 12)" and "Year(For Example 17 for 2017" in my local variables.
I want to compare it with Current Month and Year.
.
$month = 04;
$year = 17;
if ($month.'-'.$year > current month & year)
{
echo "not expired";
}
else
{
echo "expired";
}
3. For example:
$old_month = 03; // March
$old_year = 17; // 2017
$new_month = 05; // May
$new_year = 17; // 2017
//how to compare and determine which month&year is old one or new one ?
Searched a lot in google and SO posts, but couldn't find any solution. Please help me.
NB: I have only month and year in my hand to compare it with current month and year.