well if that thread title hasn't put you off here's my problem:
I am working with a third party xml feed - its a list of offices for rent
I can get the nodes fine like this :
foreach ($xmlfile ->Property as $prop) {
echo '<span class="disp1"><b>'.$prop->Number.', '.$prop->Address.', '.$prop->Town.', '.$prop->Postcode.'</b></span>';
but the source file includes images like this: "Images->Image1"
so while I can get an explicit Image1 or an explicit Image2 I cant get a method to iterate over the available images
I've tried this:
$i=1;
foreach( $prop->Images as $imag){
$curritem='Image'.$i;
echo '<div class="disp1">'.$imag->$curritem.'</div>';
$i++;
};
and this
$j=1;
$curritem="images".$j;
foreach( $prop->Images ->$curritem as $imag){
$j++;
$curritem="images".$j;
echo '<div class="disp1">'.$imag.'</div>';
};
both display Image1 but neither iterates over the source
I dont have any control over the source..
any suggestions welcome -
thanks
(and I know the above will only display the Image name !)