Answer the question
In order to leave comments, you need to log in
How to extract the items parameter?
The VK API has a group.get method that returns two parameters in json: count and items
For example, I can extract the count parameter like this: $count=$zapros->response[0]->count;
Because it looks like all normal parameters: parameter:value
But there is a problem with items, there are several values and everything looks like this: items:[value, value...], how to extract all these values from items ??? Just like with count, it doesn’t work, square brackets or several values interfere (
Answer the question
In order to leave comments, you need to log in
Well, for example:
$test = json_decode($json_string);
//Выведет 142342685
echo $test->response->items[0];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question