hello i will filter xml elements and will display one element with an specified identification like this:
<?php
$url11= 'http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v0002/?key=XXXXXXXXXXXXXXXXXX&appid=240&l=german&format=xml';
$data11 = file_get_contents($url11);
$xml = simplexml_load_string($data11);
$joke ="WIN_BOMB_PLANT";
foreach($xml->availableGameStats->achievements->achievement as $key => $value) {
if($value->name->__toString() != $joke) {
?>
<img src="<?php echo $value->icon->__toString(); ?>" border="0" height="64" width="64" >
<?php
}
}
?>
and here is the xml document:
-<game>
<gameName>ValveTestApp260</gameName>
<gameVersion>181</gameVersion>
-<availableGameStats>
-<achievements>
-<achievement>
<name>WIN_BOMB_PLANT</name>
<displayName>Bombenleger</displayName>
<icon>
http://media.steampowered.com/steamcommunity/public/images/apps/240
/4711014791e4ae29408e8bc2fcae1ab61ca7c189.jpg
</icon>
</achievement>
-<achievement>
<name>BOMB_PLANT_LOW</name>
<displayName>Boomala Boomala</displayName>
<icon>
http://media.steampowered.com/steamcommunity/public/images/apps/240
/5f689c20656716f2a8bf67bd26f3f7846786bca5.jpg
</icon>
</achievement>
<achievement>
-Another things-
</achievement>
</achievements>
</availableGameStats>
</game>
But now its display every element. like this example: https://i.stack.imgur.com/BagDu.jpg
But i will that the script just display this specified one like this: https://i.stack.imgur.com/X2Oph.png
can help me anyone? thanks ahead .. srry for my bad english or bad english ...