Get value from a JSON with PHP -
how can value of name
in infos
?
{ "infos": { "name": "marc twain" }, "datas": [ {...} ] }
do need foreach
?
what tried without success:
$json = json_decode($file); $json->infos[0]->name
could me?
infos
not array, do:
$json->infos->name
Comments
Post a Comment