Ads

Getting to know the date() function

So you wanna know about how to display the date using PHP. Well there are so many variables and ways to display it. For instance, you can display just the year, or the year and the month or anything, mix and match.

Come along and join me on a journey, haha just kidding.

Example Code:

CODE
<?
echo date("D M d, Y H:i:s");
?>



Breakdown:

D stands for Day
M stands for Month
d stands for Day (Number)
Y stands for Year
H stands for Hour
i stands for minutes
s stands for seconds

Finished Output:
Mon Oct 27, 2006 12:03:24

Any questions, feel free to post or check-out the link below!

For more information and combinations check here - http://ca.php.net/date/

Sunday May 27, 2007 - 87 reads