Hiya folks, I am a complete novice in PHP (well programming languages in general). I downloaded a custom written PHP page which pulls data from an XML feed and displays the results on screen.
A chunk of this code is as follows
while (list ($key, $val) = each ($smon['DETAILS'])){
?>
<td width="100" height="19" Align="left" valign="bottom" bgcolor="#000000"><b><font face="Arial" size="1" color="#808080">
<?PHP
print "$val<br>\n";
?>
</font></b></td>
</tr>
<?php
}
So I'm taking the results from the XML feed and displaying them in a stardard HTML table. What I'd like to be able to able to do is this, one of the $key values is the word 'map' and when this value is found I'd like to load the corresponding $val into a variable that I can use later in the page. And secondly I may need to loop through the routine again but when I've tried repeating the code further down the routine, nothing happens. It's almost as if doing the loop once has set the loop at the end (I'm not explaining this very well) so further loops have no effect. In ASP I'd use something like Myrs.Movefirst to set the recordset back to the beginning.
Like I said I am a total novice in this and to honest I don't understand most of the code above.
Any help would be great.
Thanks in advance