I have this array which as output from a json format.
Array
(
[totalSize] => 1
[done] => 1
[records] => Array
(
[0] => Array
(
[attributes] => Array
(
[type] => Emp
[url] => /services/data/v20.0/sobjects/AG
)
[Name] => John Doe
[Company__r] => Array
(
[attributes] => Array
(
[type] => Comp
[url] => /services/data/v20.0/AZ
)
[Name] => LINEA
)
)
)
)
I was able to access the Name
property which the value is John Doe with the following code..
foreach ($result['records'] as $record) {
print_r($record['Name']);
print_r("<br>");
}
But i am unable to access the Name
property which the value is "Linea". How should i access the innermost value. ?