PHPSuperBlog.com

Display the date with PHP

I recently worked on a web project which I need to add the date on a page. I used the date( ) function of PHP to accomplish the job. Here are my examples for your reference:

In order to show the time, we have to print it out onto the screen, and we use “echo” or “print” to do so:
If we just echo out the with the date() function:

< ?php
echo date( );
?>

We will get an error message because the date( ) function needs at least 1 parameter.

There are many parameters for date( ) function and here are a few useful one which I want to talk about:
Continue Reading →

  • Categories

  • Useful Downloads