Hell and Heaven Net
05/10 - KH2 Magic List added ¤ 28/09 - Roms section revamped and added roms! ¤ 09/09 - Crisis Core OST info added ¤ 27/08 - 13 FF13 screenshots added! ¤ 21/08 - 35 FF13 magazine scans added! ¤ 20/08 - Release dates updated ¤ 03/08 - FF12 Movies page updated ¤ 03/08 - Site News system improved ¤ 30/07 - Final Fantasy XIII section updated ¤ 29/07 - New Poll added! results old poll ¤ 14/07 - Release dates updated ¤ 14/07 - Final Fantasy XIII E3 trailer added! ¤ 07/07 - Chrono Trigger DS trailer added ¤ 24/06 - Crisis Core voice actors info added ¤ 15/06 - New Affiliate: Square Anthology! ¤ 12/06 - Star Ocean: The Last Hope trailer added! ¤ 28/05 - FF9 Hints & Secrets page added ¤ 17/05 - FF9 Item list added ¤ 15/05 - 12 Crisis Core HQ FMV screenshots added! ¤ 13/05 - FF9 Blue Magic list updated ¤ 12/05 - Release dates updated ¤ 10/05 - 4 Grandia II movies added ¤ 27/04 - Added 3 PSF archives! ¤ 24/04 - Release dates updated ¤ 23/04 - FF10 OST info added ¤ 21/04 - FF9 OST info added ¤ 21/04 - Dropped 2 affiliates ¤ 20/04 - HHN Radio back online! ¤ 14/04 - Topsites back online!

This little tutorial will go about inserting date and/or time into a webpage using PHP. This is better than using Javascript, because the code is smaller and it doens't require javascript to be installed.

To include a date into a webpage, insert this code. The file's extension must be .php.

<?
$date = date("l, j F Y");
echo $date;
?>

If you insert this you'll get: Thursday, 16 October 2008. You can change it of course to with you like. Here's a list with all the available codes.

Letter Output
a Gives "am" or "pm".
A Gives "AM" of "PM".
B Swatch Internet time ("000" till "999")
d Day of the Month, from 01 till 31.
D Day of the week, in 3 letters, example Mon, Wed etc.
F Month full out, so "January", "March" etc.
g Hours, in 12-hoursformat, example 4 or 8.
G Hours, in 24-hoursformat, example 8 or 19.
h Hours, in 12-hoursformat, example 04 or 08.
H Hours, in 24-hoursformat, example 08 or 19.
i Minutes, from 01 to 60.
I Displays "1" when Daylight Saving Time, otherwise "0".
j Number of the day of the month, example 1 of 17.
l Day of week full out, for example "Monday", "Wednesday" etc.
L Whether it's a leap year. 1 = Yes, 0 = No.
m Month in number, for example 01 or 10.
M Month in 3 letters, so "Jan" or "Feb".
n Month in numbers, so 1 or 10.
O Difference in Greenwich-time, for example "+0100" of "+0200".
r Full date, example: "Mon, 12 Feb 2003 14:22:50 +0200".
s Seconds, example 01 of 35.
S "st", "nd" of "rd".
t The number of days that the current month has, so 28, 29, 30 or 31.
T Time zone setting of this machine (so CET).
U Seconds since the Unix Epoch.
w Day of the week, in numbers, from 0 to 6 (0 = Sunday).
W ISO-8601 week number of the year, week starts on Monday.
y Year in two numbers, example 01 or 03.
Y Year in four numbers, example 2001 or 2003.
z Day of the year, from 0 to 365.
Z Time zone offset in seconds.

If you have any problems with this, feel free to contact me by using the contact form.