4
I’m extracting from a array city names. I want to extract cities with different names. In the current case, my script returns several identical city names. 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 of a Webservice, then the bid would be to return only 1 property from each city or group real estate by cidade.
Does code make a difference to you? It’s code of what?
– rray
I am developing a website from a webservice and wanted to extract the cities to put in a search dropdowm ... http://new.pier36imoveis.com.br/search
– Marcos Vinicius