I am extracting from a array
city name. I want to extract cities with different names. In the current case, my script returns several names of equal cities. I want to recover only once each city name.
The result is this:
Array
(
[2] => Array
(
[Codigo] => 2
[Cidade] => Porto Alegre
)
[3] => Array
(
[Codigo] => 3
[Cidade] => Porto Alegre
)
[4] => Array
(
[Codigo] => 4
[Cidade] => Porto Alegre
)
...
The script being used is this:
$cidades = new Imoveis;
$city = $cidades->get_cidades($cidades->key, $cidades->tipo, $cidades->param);
echo "<pre>";
print_r($city);
This script returns me real estate from a Webservice
, so the bid would return only 1 property from each city or group real estate by cidade
.