I looked through the search results and from what I see it should be working.
Here is my code:
if ($result)
{
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
$article = $row['1'];
$title = $row['2'];
$display = $row['3'];
$submit_date = $row['4'];
$category = $row['5'];
}
$submitdate_array = getdate($submit_date);
$article_year = $submitdate_array[year];
print("$submit_date <br />");
print("$article_year <br />");
}
The date field ($row['4']) is a date field in the db. I have been using PHPMyAdmin to insert data but am creating a php page so others can interface too.
What gets outputed follows:
2007-06-18 ($submit_date from the db)
1969 ( $article_year should be 2007)
Any thoughts would be great.
Thanks