PHP - How to get year, month, day from time string
<p>Given the following timestring:</p>

<pre><code>$str = '2000-11-29';

$php_date = getdate( $str );
echo '&lt;pre&gt;';
print_r ($php_date);
echo '&lt;/pre&gt;';
</code></pre>

<p>How to get the year/month/day in PHP?</p>

<pre><code>[seconds] =&gt; 20
[minutes] =&gt; 33
[hours] =&gt; 18
[mday] =&gt; 31
[wday] =&gt; 3
[mon] =&gt; 12
[year] =&gt; 1969
[yday] =&gt; 364
[weekday] =&gt; Wednesday
[month] =&gt; December
[0] =&gt; 2000
</code></pre>

<p>I don't know why I get 1969 for year.</p>

<p>Thank you</p>
