View Single Post
Old 03-13-2009, 04:29 PM   #2 (permalink)
tony
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

I think it's because you put the header inside the loop. try putting the headers before the loop.

PHP Code:
$xml = new SimpleXMLElement($rosterxml); 
echo 
'<table><thead>
        <th>Name</th>
        <th>Race</th>
        <th>Class</th>
        <th>Level</th>
        <th>Rank</th>
        <th>Achievements</th>
        
        </thead>'
;
foreach (
$xml->guildInfo->guild->members->children() as $char) {
    
    echo 
'<tr>  
         <td class="roster">' 
$char['name'] . '</td> 
         <td class="roster">' 
$char['race'] . '</td>
         <td class="roster">' 
$char['class'] . '</td>
         <td class="roster">' 
$char['level'] . '</td>
         <td class="roster">' 
$char['rank'] . '</td>
         <td class="roster">' 
$char['achPoints'] . '</td>
         
      </tr> '
;

}
echo 
'</table>'
tony is offline  
Reply With Quote
The Following User Says Thank You to tony For This Useful Post:
commonmind (03-13-2009)