Unable to access array within JSONObject after converting it to PHP variable -
Unable to access array within JSONObject after converting it to PHP variable -
i have jsonobject , 1 of properties array. convert jsonobject variable in php using:
$file = file_get_contents($page); $jason = json_decode($file,true); where $page webpage jsonobject. however, when seek access property of new object in php had array value in json, value php spits "array". ex:
$jason['address']; returns word "array" instead of actual array. how can actual info within of jsonobject's array?
that means $jason['address']; array , cannot echoed.
var_dump($jason['address']); will give array information.
i suggest using:
var_dump($jason); to see info working with.
php arrays json
Comments
Post a Comment