03-13-2009, 04:29 PM
|
#2 (permalink)
|
|
The Addict
Join Date: Aug 2008
Posts: 336
Thanks: 8
|
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>';
|
|
|
|