Good Morning guys, i have problem in converting the date (which is in numerical format) in text format....
suppose i have a date..
$date = 12/01/2009
so its output should be, 12th january 2009 (means i have to just convert the month only not the date or year)
Thanx
Change format of date
Moderator: General Moderators
Re: Change format of date
Convert the /s to -s, then run it through strtotime():
Code: Select all
$date = "12/01/2009";
$date = str_replace("/", "-", $date);
echo date("r", strtotime($date));