Displaying the date and Using the date function in PHP
25996Displaying the date and Using the date function in PHPhttp://www.primegraphix.com/articles/20.phpThis is a short tutorial on the date function in PHP. Its aimed at newcomers to the PHP language and shows some simple yet effective ways of displaying the date in your PHP pages. The tutorial also gives examples of arguments given to the date function.PHP > Tips and Tutorials > Date and TimeOct 15, 2006PrimeGraphix
This code is for when you have a list of events you would like to put on a Web page but don't want to have to keep track of which events have expired and manually delete them. The code will check the date of each event and only display the events that are of the current day or forward. Even if you don't have use for this particular script, you will see how you can use the date format to compare today's date to other dates.
First of all try to collect the necessary information which are important to display the actual month and highlight the actual day. Besides this we want to display the actual month and year informations as well. To do this we need 3 special days informations:
The actual day
The first day of the actual month
The last day of the actual month
it's nice to have your website say "last modified $date" with $date being the last time the page was, modified. this can be done in many ways, here are a few ways in perl, javascript and of course, PHP.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.