The following script demonstrates the use of the date function in PHP. The script generates the current time. The date is formatted by using characters such as "l", "f", "d", and "y". There are others but they aren't used here.
1. The date function can call for the current date to be displayed on a php enabled web page.
The date function is as follows: print(Date("l F d, Y"));
l = Day of the week (Monday, etc)
f = Month (January, etc)
d = Day of the month (1, 2, etc)
y = Year (2004, etc)
It will basically be displayed as Friday May 14, 2004. You can change the format by re arranging the letters in the string "l F d, Y". To see this script in action click here.
date.php