I have a json return that looks like this:
[output] => stdClass Object
(
[data] => stdClass Object
(
[Email] => Array
(
[0] => [email protected]
[1] => [email protected]
)
[PhoneNumber] => Array
(
[0] => 2031234569
)
)
What i need to do is be able to loop through the phones and emails and get them all.
I have tried:
foreach ($json_result->output->data as $data) {
$phone = $data->PhoneNumber;
$email = $data->Email;
}
but this is returning empty. Anyone have an idea?
$phoneand$email?