Jump to content

Problem to show "players_xml" in a php web


Sylvert

Recommended Posts

You need to use PHP's xml functions to parse the contents and read the player values.

 

I try to do the following:

 


if( mysql_num_rows( $r ) )
 if( $m = mysql_fetch_array( $r ) )
      $xml = $m['players_xml']

foreach( $xml as $item )
{
  echo( 'Name: '. $item->name );
}

 

It does not work, get the following error

 

Warning: Invalid argument supplied for foreach() in servers.php on line 52

Edited by Sylvert
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 89 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use