...
$aaa = array();
while ($row = mysql_fetch_array($resultFriends, MYSQL_ASSOC)) {
$aaa[] = array(
"id_friend" => $row['id'],
"name_friend" => (string)$row['name'],
"surname_friend" => (string)$row['surname'],
"city_friend" => (string)$row['city']
);
}
var_dump($aaa);
echo json_encode($aaa, JSON_UNESCAPED_UNICODE);