I’ve been stuck with a problem with JSON and PHP for a while now. I have a JSON object like:
{"statistics":[{"name":"someName"},{"name":"someName2"}]}
The problem is that someName sometimes takes someNames2‘s playce and reverse, but I only want to show someName2. How do I do that? =(
You can use
array_filterto filter thejsonarray wherename = someName2.. this waysomeName2position would not matter …