From JSON I get:
stdClass Object ( [$t] => 2011-12-12T13:00:00.000Z )
How can I get this date out using PHP?
I tried:
feed->item->'$t' and that did not work...
From JSON I get:
stdClass Object ( [$t] => 2011-12-12T13:00:00.000Z )
How can I get this date out using PHP?
I tried:
feed->item->'$t' and that did not work...
This should work:
$t = $feed->item->{'$t'};
Beware: This will only work with single quotes, because PHP does variable interpolation on strings with double quotes.
json_decode($json, true).Try:
$item = $feed->item->{$t};
The {$notation} allows you to use vars as object names.
'$t'.