I have an array like this:
$data = [
"x" => [
"y" => 5,
"a.b" => 10
]
]
I can access x.y like this:
array_get($data, 'x.y');
However, how can I access x.(a.b) (sometimes written as x.a->b)
I tried the following:
array_get($data, 'x.a.b');
array_get($data, 'x.a->b');
But neither seems to work.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2z37jC0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire