Change Date Format in php

How to change date format in php?
we can display date in different formats in php as given:-

$dt = “2001/02/02”;
echo date(‘d M Y’, strtotime($dt));

Output:- 02 Feb 2001

$dt = “2001/02/02”;
echo date(‘M d Y’, strtotime($dt));

Output:- Feb 02 2001

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.