Answer the question
In order to leave comments, you need to log in
How to get gid parameters?
How can I get the gid parameters for each community from this JSON?
{
"response": [4,
{
"gid": 142342685,
"name": "Foxy Bot | Создай своего бота (Beta)",
"screen_name": "foxybotgroup",
"is_closed": 0,
"type": "group",
"photo": "https:\/\/pp.userapi.com\/c837226\/v837226447\/37d83\/0HoKk2bVjqg.jpg",
"photo_medium": "https:\/\/pp.userapi.com\/c837226\/v837226447\/37d82\/wesQ6khbojQ.jpg",
"photo_big": "https:\/\/pp.userapi.com\/c837226\/v837226447\/37d81\/8CyKKaZy0QI.jpg"
},
{
"gid": 145826725,
"name": "FoxyWeb - 145826725",
"screen_name": "club145826725",
"is_closed": 0,
"type": "group",
"photo": "https:\/\/vk.com\/images\/community_50.png",
"photo_medium": "https:\/\/vk.com\/images\/community_100.png",
"photo_big": "https:\/\/vk.com\/images\/community_200.png"
},
{
"gid": 146389115,
"name": "Fleo Web - 146389115",
"screen_name": "club146389115",
"is_closed": 0,
"type": "group",
"photo": "https:\/\/vk.com\/images\/community_50.png",
"photo_medium": "https:\/\/vk.com\/images\/community_100.png",
"photo_big": "https:\/\/vk.com\/images\/community_200.png"
},
{
"gid": 145511947,
"name": "BetaEasyBot",
"screen_name": "club145511947",
"is_closed": 0,
"type": "group",
"photo": "https:\/\/vk.com\/images\/community_50.png",
"photo_medium": "https:\/\/vk.com\/images\/community_100.png",
"photo_big": "https:\/\/vk.com\/images\/community_200.png"
}]
}
Help plz)
Answer the question
In order to leave comments, you need to log in
$res = json_decode($json);
foreach ($res->response as $array)
{
echo $array->gid. '<br />';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question