- getdate: documentation ( source)
- print_r: documentation ( source)
- date: documentation ( source)
<?php
// Prints the day, date, month, year, time, AM or PM
echo date("D, j F Y h:i:s") . "<br>";
// Print the array from getdate()
print_r(getdate());
echo "<br><br>";
// Return date/time info of a timestamp; then format the output
$mydate=getdate(date("U"));
echo "$mydate[weekday], $mydate[month] $mydate[mday], $mydate[year]";