t
returns the number of days in the month of a given date (see the docs for date
):
$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
More Related Contents:
- Display which day it is? sunday or monday “php coding”? [closed]
- PHP store hours, closed dates [closed]
- Getting error in coding PHP [closed]
- PHP 01/01/1970 Issues with Date Fields
- Convert one date format into another in PHP
- PHP How to find the time elapsed since a date time? [duplicate]
- Converting string to Date and DateTime
- Compare given date with today
- How to convert date to timestamp in PHP?
- A non well formed numeric value encountered
- Convert number to month name in PHP
- Adding minutes to date time in PHP
- Elegant way to get the count of months between two dates?
- Calculating days of week given a week number
- PHP: Adding months to a date, while not exceeding the last day of the month
- Find Month difference in php? [duplicate]
- Get week number (in the year) from a date PHP
- Send PHP date to JavaScript date format
- How to sort date array in php?
- get next and previous day with PHP
- how to re-format datetime string in php?
- how to convert php date formats to GMT and vice versa?
- Getting last month’s date in php
- change the date format in laravel view page [duplicate]
- Calculate the number of months between two dates in PHP?
- How to display a date as iso 8601 format with PHP
- Date in a URL dd/mm/yyyy
- Format date from database?
- Formatting an SQL timestamp with PHP
- Validate date format in php