getdate

(PHP 3, PHP 4 >= 4.0b1)

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";