I find I can’t figure out the desired output. I have JSON raw data contains this: This is what I have tried I want to get all the keys of the arrays and if tickers has multiple value don’t echo it. Sample desired output: Answer You should be able to just loop over the data key of your source data,
Tag: array-unset
json with no index after unset encode array in php
I hope anyone can help me. My JSON isn’t indexed (i.e. there isn’t any key above any element) but after running unset() to remove an element with PHP the output JSON appears like this: How you can see there is a key before the element of JSON. I know that this behavior is caused by unset (PHP json_encode as object