Hello. There is a JSON of this type:
{ "response":{ "count":10, "items":[], "profiles":[], "groups":[] } }
How to get from it the number of elements that are contained in groups?
For example, you can like this:
$json = '{"response": {"count": 10, "items": [], "profiles": [], "groups": [] } }'; $arr = json_decode($json, true); echo count($arr['response']['groups']);
Source: https://ru.stackoverflow.com/questions/611824/More articles:Array of random non-repeating numbers [duplicate]Creating class instances in a loopSelenium. Getting a cookie from the siteSphinxQL: sql_attr_multi unique GROUP BYGetting the number of members of VK API groupsIn practice, make buttons via css or photoshop?What library can I use to make a similar UI? [closed]Multilingual sitePHP parse JSONAdd to ListView via SimpleCursorAdapterAll Articles