I'm documenting some programs that contains the following PHP code:
function getLastDayOfMonth3($month, $year) {
return date('d', mktime(0, 0, 0, ($month + 1), 0, $year));
}
it's invoked on some point of the programs:
$last_day=getLastDayOfMonth3($month_proc,$year_proc);
The big question (don't laugh please), is what is does this function? does it return the last day of the month for a given month and year?
Thanks a lot for your help!!!!
help me to understand this simple php code
Moderator: General Moderators
-
himalaya73
- Forum Newbie
- Posts: 2
- Joined: Sat Jan 24, 2009 7:05 pm
Re: help me to understand this simple php code
Judging by the name "getLastDayOfMonth" I would have to conclude that it determines what the last day of a month is.
Or in other words, how many days there are in a certain month.
(Looking at the code confirms that.)
Or in other words, how many days there are in a certain month.
(Looking at the code confirms that.)