Walking through multidimensional json array with PHP
I need to access a large nested multidimensional array in json using PHP
So, in the example below I need to get to the ID at the very bottom, I can do it by using echo $myarray['Data']['Car']['Id']
but how do I access by key, e.g. ['Data'][0]['Id'] and how can I loop through all of the array values, if I am only interested in the Id value??
$myarray =
Array (
[Response] => Success
[Message] => Lorem Ipsum
[URL] => https://www.test.com
[BaseLinkUrl] => https://www.test.com
[Default] =>
Array (
[Desc] => 12345
[Known] => yes )
[Data] =>
Array (
[Car] =>
Array (
[Id] => 98333
etc...
|