David Carrdcblogdev.hashnode.dev·Feb 9, 2017Quick way to get the number of days in a month with PHPI’m building a php calendar and need to know the total number of days in a month in the past I've used: echo cal_days_in_month(CAL_GREGORIAN, 2, 2017); For the current month you can use: echo date('t'); Or for a more a date based approach: e...55 readsAdd a thoughtful commentNo comments yetBe the first to start the conversation.