Skip to content
Advertisement

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

Advertisement