PHP - How to get year, month, day from time string

resaik_king

New Member
Given the following timestring:\[code\]$str = '2000-11-29';$php_date = getdate( $str );echo '<pre>';print_r ($php_date);echo '</pre>';\[/code\]How to get the year/month/day in PHP?\[code\][seconds] => 20[minutes] => 33[hours] => 18[mday] => 31[wday] => 3[mon] => 12[year] => 1969[yday] => 364[weekday] => Wednesday[month] => December[0] => 2000\[/code\]I don't know why I get 1969 for year.Thank you
 
Back
Top