getdate

(PHP 3, PHP 4 )

getdate -- Get date/time information

Description

array getdate ([int timestamp])

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given, as the following array elements:

Example 1. getdate() example

$today = getdate(); 
$month = $today[month]; 
$mday = $today[mday]; 
$year = $today[year]; 
echo "$month $mday, $year";