Re: Object Array?
| From: | Jochem Maas | Date: | Thu, 18 May 2006 20:11:25 +0000 |
| Subject: | Re: Object Array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236436@lists.php.net to get a copy of this message | ||
Jay Paulson (CE CEN) wrote:
...
hey would you look at that - another happy punter guided by pure guess work :-) (I still not any nearer to grokking simpleXML)what happens when you do: foreach ($xml->RES->R as $key => $r) { echo $r->__toString(); // or echo $key; } ?That actually works. Strange because I tried this method first yesterday and spent over an hour trying to get it to work and now it's working? AH! :) Below is the code I use. foreach ($xml->RES->R as $key => $r) {echo $r->U.'<br>'; echo $r->UD.'<br>'; echo $r->UE.'<br>'; echo $r->T.'<br>'; echo $r->RK.'<br>'; echo $r->S.'<br>'; echo $r->LANG.'<br>'; echo '<hr>';}