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

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -