i now how to get the last day of the current month like this...
Code: Select all
$lastday = mktime(0, 0, 0, $search_month-1, 0, $nowArray['year']);Code: Select all
$lastday = mktime(0, 0, 0, ($search_month-1), 0, $nowArray['year']);Help
Mark
Moderator: General Moderators
Code: Select all
$lastday = mktime(0, 0, 0, $search_month-1, 0, $nowArray['year']);Code: Select all
$lastday = mktime(0, 0, 0, ($search_month-1), 0, $nowArray['year']);Code: Select all
$lastday = mktime(0, 0, 0, ((!$search_month-1) ? $search_month=12 : $search_month), 0, $nowArray['year']); ;How about mktime(0,0,0, $search_month, 0, $nowArray['year'])?Bech100 wrote:I need to get the last day of the previous months e.g 30 or 31Code: Select all
$lastday = mktime(0, 0, 0, $search_month-1, 0, $nowArray['year']);
Code: Select all
echo date('Y m d',strtotime(date('M').' last day'));