tags:

views:

60

answers:

3

Hey, I'm just wondering how to convert a numerical date into text format in PHP

Example change

06.04.2010 to say April 6th 2010

Is there any function already made?

+5  A: 

Check out these PHP functions, used together I think you will get what you're looking for:

i.e.:

$mydate = strtotime('06.04.2010');
echo $date('F jS Y', $mydate)
JYelton
Thanks a lot! Sorry, I'm new to php.
Belgin Fish
"Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime" :-)
zerkms
A: 

strtotime()
date()

don't be lazy

zerkms
A: 

Note that strtotime() may be difficult with non-US format dates at times (in particular dates of DD/MM/YYYY formats, although it's fine with YYYY-MM-DD); if you're using PHP 5.3, you will almost certainly have better results using something like the DateTime class, which allows you to specify what format the date is in.

El Yobo