I have this json data, so i having problems to count the numbers of persons appearing in this array, as you can see the format for each element is {"id":"1038863770","name":"Carol Rodovalho"}. I tried to change the format to a normal php var using the json decode function and then i used “count” but the result is 1, and that is not true, at least is not counting what i need. Thanks for any help!
I have this json data, so i having problems to count the numbers of
Share
You’ve got everything wrapped in a big data object in the json, so do something like this:
PHP Manual for json_decode.