Wednesday, June 17, 2009

How to display date format in PHP

Problem
I currently have

PHP Code:
echo $rows['date'];

which display date as "2009-06-17" (year, month, day)

Solution
PHP Code:
echo date('d m Y', strtotime($rows['date']));

Now i can display date as 22 06 2009

Enjoy ubuntu... ;)

No comments:

kunkun-laptop .... ;)