$result=mysql_query("SELECT name, vk_access_token, id FROM foxy_groups WHERE user_id = '$uid'");
$data = mysql_fetch_assoc($result);
$array = [];
$result=mysql_query("SELECT name, vk_access_token, id FROM foxy_groups WHERE user_id = '$uid'");
while($user = mysql_fetch_assoc($result)){
$array[] = $user;
}
echo '<pre>';
print_r($array);
$q = $db->query("SELECT name, vk_access_token, id FROM foxy_groups WHERE user_id = '$uid'");
$result = $q->fetchAll();
echo '<pre>';
print_r($result );