1
Colleagues.
I have the following code:
<pais>
<estado tipo="RJ">
<bairro nome="listar">
<local>
<aparecer>Flamengo</aparecer>
</local>
<local>
<aparecer>Botafogo</aparecer>
</local>
<local>
<aparecer>Urca</aparecer>
</local>
</bairro>
</estado>
</pais>
And taking with PHP this way:
$arquivo = "bairros.xml";
$xml = simplexml_load_file($arquivo);
foreach ($xml->estado->bairro as $listar) {
echo $listar->local->aparecer;
echo "<br>";
}
He just returns me the first neighborhood and not all.
Bingo William. Thank you!
– user24136