$friends_getRequests = curl( 'https://api.vk.com/method/friends.getRequests?offset=1&count=1&extended=1&need_viewed=1&access_token='.$token);
{"response":[{"uid":33224900},{"uid":205869219},{"uid":321678938},{"uid":364608800},{"uid":360153341},{"uid":361830009},{"uid":277374452},{"uid":232364661},{"uid":81323385},{"uid":345063168},{"uid":359946852},{"uid":348982141},{"uid":19482073},{"uid":217818751},{"uid":275193481}]}
$response = '{"response":[{"uid":33224900},{"uid":205869219},{"uid":321678938},{"uid":364608800},{"uid":360153341},{"uid":361830009},{"uid":277374452},{"uid":232364661},{"uid":81323385},{"uid":345063168},{"uid":359946852},{"uid":348982141},{"uid":19482073},{"uid":217818751},{"uid":275193481}]}';
$data = json_decode($response, true);
if (json_last_error() === JSON_ERROR_NONE && isset($data['response'][0]['uid'])) {
$user_1 = $data['response'][0]['uid'];
}
$s = '{"response":[{"uid":33224900},{"uid":205869219},{"uid":321678938},{"uid":364608800},{"uid":360153341},{"uid":361830009},{"uid":277374452},{"uid":232364661},{"uid":81323385},{"uid":345063168},{"uid":359946852},{"uid":348982141},{"uid":19482073},{"uid":217818751},{"uid":275193481}]}';
$json = json_decode($s);
$user_1 = $json->{'response'}[0]->{'uid'};
echo($user_1);
$s = '{"response":[{"uid":33224900},{"uid":205869219},{"uid":321678938},{"uid":364608800},{"uid":360153341},{"uid":361830009},{"uid":277374452},{"uid":232364661},{"uid":81323385},{"uid":345063168},{"uid":359946852},{"uid":348982141},{"uid":19482073},{"uid":217818751},{"uid":275193481}]}';
$json = json_decode($s);
$users = array();
if (!json_last_error())
{
foreach($json->response as $user)
{
$users[] = $user->uid;
}
}
var_dump($users);