how to get the number of days of the current month? in PHP
date('t');
or you may use
cal_days_in_month.
see here: http://php.net/manual/en/function.cal-days-in-month.php
There is probably a more elegant solution than this but you can just use php's date function:
$maxDays=date('t');
$currentDayOfMonth=date('j');
if($maxDays == $currentDayOfMonth){
//Last day of month
}else{
//Not last day of the month
}
Try to use this:
date('t');