1
Hello I am trying to display the results of an XML file but it returns me only the first records, from the second record I have no more results. what might be wrong?
To be inside a foreach
should show all records, but only the first appear.
I tried to turn the file like a string but the result was the same,
simplexml_load_string($texto)
only the first records were displayed.
$xml = simplexml_load_file("arquivo.xml");
foreach ($xml->PEDIDOS as $PEDIDOS ) {
echo $PEDIDOS->PEDIDO->PRODUTOS->PRODUTO->PRODUTO_COD."<br /><br />";
echo $PEDIDOS->PEDIDO->PRODUTOS->PRODUTO->PRODUTO_COD_FORNECEDOR."<br /><br />";
}