I hope I can explain my problem well enough! I would normally use a foreach loop but I need an alternative as each entry will be displayed on a separate web page. To add to my confusion it is not an array but a DOMNodeList that I am working with. What I would have if I were not displaying each entry on a separate page is:
So my query is what do I use in place ofPHP Code:$items = $doc->getElementsByTagName('item');
foreach ( $items as $item ) {
$questions = $item->getElementsByTagName('question');
...
}
Thanks GPHP Code:foreach ( $items as $item ) {
![]()



Reply With Quote



Bookmarks