Re: Object Array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Paulson (CE CEN) wrote:

...

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>';

}


hey would you look at that - another happy punter guided by pure guess work :-)
(I still not any nearer to grokking simpleXML)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux