04-01-2009, 03:37 AM
|
#93 (permalink)
|
|
The Visitor
Join Date: Apr 2009
Posts: 1
Thanks: 0
|
Hi all,
Okay i've been trying to use this script for my guild roster but i've run into a little snag... The foreach() loop doesn't like my guild name cause it has the special character Ú in it... Is there any way to get the script to accept that character? Any help would be appreciated...
My work around works fine but I don't want to have to edit my SQL every time someone join's...
Here's my work arround
PHP Code:
$query = "SELECT * FROM guild"; //Main Query $result = mysql_query($query) or die('Error, query failed'); //Parse results while($row = mysql_fetch_array($result)){ echo '<tr>'; $armory = new armory(character, malfurion, NULL, $row['name'], NULL); $xml = $armory->pull_xml(); echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['name'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['class'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['level'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['realm'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['guildName'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['race'] .'</div></td>'; echo '<td> <div class="roster-text-wrapper">'. $xml->characterInfo->character['gender'] .'</div></td>'; echo '</tr>'; }
Edit: no matter what I try in the guild field in the script it won't display and when I use the foreach loop it errors out saying "Invalid argument supplied for foreach()" I've done countless google searches and poured through pages of stuff but have yet to find and answer... I know its that special letter cause when i put in someone elses guild name it shows right up...
Last edited by Jamezy91 : 04-03-2009 at 02:04 AM.
|
|
|
|