When I print_r
my array, it shows a series of Date Objects like below:
DateTime Object
(
[date] => 2011-11-08 00:00:00
[timezone_type] => 3
[timezone] => America/New_York
)
DateTime Object
(
[date] => 2011-11-17 00:00:00
[timezone_type] => 3
[timezone] => America/New_York
)
... etc, etc
But when I try to echo it out, I hit a 500 Error. What gives? I don't see any difference between
print_r($row[$x]['OrderDate']);
and
echo '<td>' . $row[$x]['OrderDate'] . '</td>';
echo $row[$x]['OrderDate']->format('m-d-Y');
echo '<td>' . date('Y-m-d', $row[$x]['OrderDate'] . '</td>'