Most of the time, the date and time functionalities of PHP 5 are used for printing out the current date and time—to pretend that the web page is up to date (you would be surprised how many larger websites actually use this). But apart from that, working with date and time in PHP offers many other possibilities, most of which you will find in this chapter.
In this code sample we will take a look at how to display date or time in our HTML pages. In PHP date() function can be used for to display in different ways. Let's see our sample.
Displaying the Current Date and Time. All data which may be obtained with command Date() is shown. A couple of examples are included: link of the day and local time
Tutorial was written for the newbie PHP programmer to show how to use the date function to display the date using PHP. We also show you the aruments to pass to the date function to display the date the way you want it. Also included are examples.