PHP's
date and time functions are a great way to show your
visitors when your website was last updated. Many
also use it for the purpose of showing the date and
time. Here on the PICS Tools website, we use it to
log our registration process in the MySQL database.
Open
up your document and place the code below into where
you wish:
|
<?php
echo
date('m.d.y');
?> |
|
This
will output something like:
09.04.10
If
you would like to display the current time you would
enter the following:
|
<?php
echo
date('h:i:s
A');
?> |
|
This
will output something like:
09:31:15 PM
Now
just re-upload your page with the .php extension and
see what you have done!
Go
Back To PHP Tutorials