Learning PHP | How to Display Date in PHP

Already know how to display the date in PHP? If not, read the tutorial.

To display the date in the PHP page you do not hard really. You can use the date () function of PHP. The following simple script will display "March 10, 2007":


If you want to change the date, simply change the order of the parameters in the date, for example, so you want to display the date "2010 March 10" then you just change the first line to be like this:

 $today = date("Y F j");

You need to experiment to better.
Previous
Next Post »