I have a problem in getting the values from all the 3 IMAGE elements coz they have the same name. Below is my xml feed
<FOUND>
<IMAGES>
<IMAGE>
<SMALL>images/small.jpg</SMALL>
<MED>images/med.jpg</MED>
<LARGE>images/large.jpg</LARGE>
<EXTRAL>images/extra.jpg</EXTRAL>
</IMAGE>
<IMAGE>
<SMALL>images1/small.jpg</SMALL>
<MED>images1/med.jpg </MED>
<LARGE>images1/large.jpg</LARGE>
<EXTRAL>images1/extra.jpg</EXTRAL>
</IMAGE>
<IMAGE>
<SMALL>images2/small.jpg</SMALL>
<MED>images2/med.jpg </MED>
<LARGE>images2/large.jpg</LARGE>
<EXTRAL>images2/extra.jpg</EXTRAL>
</IMAGES>
</FOUND>
I have written a function in php that will return the first block.
function images($id){
$xml=simplexml_load_file("feed.xml");
foreach ($xml->FOUND->IMAGES as $image)
{
$imagearr[]=array(
'small'=>$image->IMAGE->SMALL,
'med'=>$image->IMAGE->MEDIUM,
'large'=>$image->IMAGE->LARGE,
'xl'=>$image->IMAGE-> EXTRAL,
);
}
return $imagearr;
}
How do I get to grab all the 3 IMAGE elements? I need to use the returned value in to the below html table
<table width="200" border="1">
<tr>
<td>small</td>
<td>medium</td>
<td>large</td>
</tr>
<tr>
<td>small</td>
<td>medium</td>
<td>large</td>
</tr>
<tr>
<td>small</td>
<td>medium</td>
<td>large</td>
</tr>
</table>
Any help will be much appreciated