0
Hello.
I have this path that is a position of a array of an XML response, and I’m taking the IDcli
.
I can’t make a foreach
along this array and show the IDcli
.
$xml = simplexml_load_string($obj);
$xml->sis->cont->Clis->Cli[0]->IDcli;
I tried just the for
, but it only counts until 9:
for ( $j = 0; $j < count( $xml->sis->cont->Clis->Cli[$j]->IDcli ); $j++ ) {
echo "<br>".$xml->sis->cont->Clis->Cli[$j]->IDcli;
}
Have you tried
foreach ($xml->sis->cont->Clis->Cli as $id) { echo $id->IDcli }
?– stderr
I put it down like I did, thank you.
– Alysson