View Single Post
Old 03-13-2009, 03:20 PM   #1 (permalink)
commonmind
The Wanderer
 
Join Date: Mar 2009
Posts: 20
Thanks: 5
commonmind is on a distinguished road
Default How to stop table header from repeating

I'm trying to figure out how to stop some table headers from repeating.

PHP Code:
$xml = new SimpleXMLElement($rosterxml); 

foreach (
$xml->guildInfo->guild->members->children() as $char) {
    
    echo 
'
        <table><thead>
        
        <th>Name</th>
        <th>Race</th>
        <th>Class</th>
        <th>Level</th>
        <th>Rank</th>
        <th>Achievements</th>
        
        </thead>
        
        
        
        <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> </table> '
;


Using the above code (I just took a guess as to how to setup the headers, obviously I was wrong), the header repeats along each row.
commonmind is offline  
Reply With Quote