Hello...
I have been trying to fix a problem for the last 2 days...but have been unsuccessful.
Here is what I need.
I have an XML file:
Now using PHP for the entire XML file which would have say 100 odd items, run a loop and print only the image URLs for each mainnode.Code:<mainnode id="1A" offid="X13"> <data> <Sub1></Sub1> <Sub2></Sub2> <Sub3> <SubSub1></SubSub1> <SubSub2></SubSub2> <SubSub3></SubSub3> <SubSub4></SubSub4> </Sub3> </data> <otherinfo></otherinfo> <userimages total="5"> <image url="theurl.com/node1image1.jpg" alttxt="imagealt" value="1" /> <image url="theurl.com/node1image2.jpg" alttxt="imagealt" value="1" /> <image url="theurl.com/node1image3.jpg" alttxt="imagealt" value="1" /> <image url="theurl.com/node1image4.jpg" alttxt="imagealt" value="1" /> <image url="theurl.com/node1image5.jpg" alttxt="imagealt" value="1" /> </userimages> <generalinfo></generalinfo> </mainnode>
currently when I run the loop.. all the images are printed on a single line (for all 100 items.
in this way -
what i want is say for first item there are 5 images so after 5 the loop breaks and on new line the next node images start.Code:node1image1.jpg node1image2.jpg node1image3.jpg node1image4.jpg node1image5.jpg node2image1.jpg node2image2.jpg node2image3.jpg node3image1.jpg node3image2.jpgnode3image3.jpgnode3image4.jpg
the printing should be like
Any ideas how it can be done.Code:node1image1.jpg node1image2.jpg node1image3.jpg node1image4.jpg node1image5.jpg node2image1.jpg node2image2.jpg node2image3.jpg node3image1.jpg node3image2.jpgnode3image3.jpgnode3image4.jpg
Thanks in advance









Bookmarks