Reverse the reading of xml

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

Reverse the reading of xml

Post by biggipsy »

Hello !

I write this code for read the xml

<?


for ($i=0;$xml->no[$i]->marca !="";$i++) {

?>
<td height="30" bgcolor="#97A7AE" class="textovisualizar"><strong><?php echo $xml->no [$i]->titulo;?></strong></td>


and work's....

But i need to reverse the reading of xml, i know from array_reverse it works.......But i wanted from my example....

Someone helps me?

Thank's
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Reverse the reading of xml

Post by Chris Corbyn »

Code: Select all

for ($i = count($xml->no) - 1; ($i > 0 && $xml->no[$i]->marca !=""); $i--) {
?
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

Re: Reverse the reading of xml

Post by biggipsy »

1. for ($i = count($xml->no) - 1; ($i > 0 && $xml->no[$i]->marca !=""); $i--) {

Work's thank's for help
Post Reply