A PHP loop procedure lets you go through each XML node and retrieve its value. Using the loop procedure, you can identify the position of a node in the list of values you have stored in the XML file. The integer value you set up in the loop structure tells you the location of the node in the file.
Right-click the PHP page you want to use to loop through the XML files. Click "Open With" and select your preferred PHP editor.
Get the list of XML nodes from the file you want to import. The following code opens the XML file:
Replace "customers.xml" with your own XML file.
Loop through each XML node. The following code loops through the nodes and the "i" variable contains the position of each node:
for (int i = 0; i < doc.nodes.count; i++ )
nodelocation = i