Hello!
How can I print (echo) the days of an unknown month if month and year are parameters?
Thank you.
Hello!
How can I print (echo) the days of an unknown month if month and year are parameters?
Thank you.
To get the number of days in a given month of a given year you can use cal_days_in_month
echo cal_days_in_month(CAL_GREGORIAN, 10, 2010); // prints 31