month value is January
and monthYear value in db is January 09
how do i make the if else to ignore the 09 to make the condition above to be true
is this possible?PHP Code:
if($month== $monthYear) {
echo "True";
} else {
echo "False";
}
}
month value is January
and monthYear value in db is January 09
how do i make the if else to ignore the 09 to make the condition above to be true
is this possible?PHP Code:
if($month== $monthYear) {
echo "True";
} else {
echo "False";
}
}
Try this
I have used strtoupper() to ensure that 'January' would match with 'JANUARY'PHP Code:$monthlength=strlen(trim($month));
if(strtoupper(trim($month))== substr(strtoupper(trim($monthYear)),0,$monthlength)) {
echo "True";
} else {
echo "False";
}
}
mulaus (09-11-2009)
thanks...awesome...you rock..it works
Bookmarks