Below is a sample json code that I want to access...This json is actually coming from an API. Whenever I copy and paste the entire json in json lint..It says valid json..
foreach ($movies as $movie) {
echo "theaters ".var_dump($movie->release_dates->theater)";
}
//Im actually trying to access a nested json in php... Something like
{
"movies":[{
"tile":"Cowboys";
"release_dates":{"theater":"2013-11-29"},
so on....
Whenever I try to write the above it gives me an error Object of stdclass cannot be converted to string
....Or if I write
$x = json_decode(var_dump($movie->release_dates->theater), true)";
echo "theaters "$x[0];
It gives an output like string[10]:2013-11-25 string[10]:2013-11-30
....So on..What is the error....