You can use a regular expression or some manual string fiddling, but I think I prefer:
date("d/m/Y", strtotime($str));
More Related Contents:
- Convert one date format into another in PHP
- Format date from database?
- Converting to date in PHP from yyyymmdd format
- Display which day it is? sunday or monday “php coding”? [closed]
- Calculate business days
- How to find the last day of the month from date?
- Compare given date with today
- How to convert date to timestamp in PHP?
- A non well formed numeric value encountered
- PHP setlocale has no effect
- Round minute down to nearest quarter hour
- 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
- Find Month difference in php? [duplicate]
- Get week number (in the year) from a date PHP
- How to sort date array in php?
- how to re-format datetime string in php?
- PHP, Get tomorrows date from date
- change the date format in laravel view page [duplicate]
- Calculate total seconds in PHP DateInterval
- Calculate the number of months between two dates in PHP?
- Date minus 1 year?
- Date in a URL dd/mm/yyyy
- PHP “pretty print” HTML (not Tidy)
- How to parse a date string in PHP?
- PHP date time greater than today
- Formatting an SQL timestamp with PHP
- php – add two hours to date variable
- Validate date format in php