<?php
$xmlfile = <<< EOT
<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="2">
<currentTime>2014-04-05 23:02:44</currentTime>
<result>
<rowset name="skillGroups" key="groupID" columns="groupName,groupID">
<row groupName="Planet Management" groupID="1241">
<rowset name="skills" key="typeID" columns="typeName,groupID,typeID,published">
<row typeName="Advanced Planetology" groupID="1241" typeID="2403" published="1">
<description>
The advanced understanding of planet evolution allowing you to interpret data from scans of planets for resources at much higher resolutions. Bonus: The skill further increases the resolution of resource data when scanning a planet to allow for very precise surveying. Note: this skill cannot be trained on trial accounts.
</description>
<rank>5</rank>
<rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel">
<row typeID="2406" skillLevel="4"/>
</rowset>
<requiredAttributes>
<secondaryAttribute>memory</secondaryAttribute>
<primaryAttribute>intelligence</primaryAttribute>
</requiredAttributes>
<rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue">
<row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/>
</rowset>
</row>
<row typeName="Planetology" groupID="1241" typeID="2406" published="1">
<description>
The understanding of planet evolution allowing you to better interpret data from scans of planets for resources. Bonus: The skill increases the resolution of resource data when scanning a planet to allow for more accurate surveying. Note: this skill cannot be trained on trial accounts.
</description>
<rank>3</rank>
<rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel">
<row typeID="13279" skillLevel="3"/>
<row typeID="3402" skillLevel="4"/>
</rowset>
<requiredAttributes>
<primaryAttribute>intelligence</primaryAttribute>
<secondaryAttribute>memory</secondaryAttribute>
</requiredAttributes>
<rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue">
<row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/>
</rowset>
</row>
<row typeName="Interplanetary Consolidation" groupID="1241" typeID="2495" published="1">
<description>
For each level in this skill, you may install a command center on one additional planet, to a maximum of 6 planets. You can have only one command center per planet. Cannot be trained on Trial Accounts.
</description>
<rank>4</rank>
<rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/>
<requiredAttributes>
<secondaryAttribute>intelligence</secondaryAttribute>
<primaryAttribute>charisma</primaryAttribute>
</requiredAttributes>
<rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue">
<row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/>
</rowset>
</row>
<row typeName="Command Center Upgrades" groupID="1241" typeID="2505" published="1">
<description>
Each level in this skill improves the quality of command facility available to you, in turn allowing for a greater number of connected facilities on that planet. Cannot be trained on Trial Accounts.
</description>
<rank>4</rank>
<rowset name="requiredSkills" key="typeID" columns="typeID,skillLevel"/>
<requiredAttributes>
<primaryAttribute>charisma</primaryAttribute>
<secondaryAttribute>intelligence</secondaryAttribute>
</requiredAttributes>
<rowset name="skillBonusCollection" key="bonusType" columns="bonusType,bonusValue">
<row bonusType="canNotBeTrainedOnTrial" bonusValue="1"/>
</rowset>
</row>
</rowset>
</row>
</rowset>
</result>
<cachedUntil>2013-10-01 18:57:01</cachedUntil>
</eveapi>
EOT;
$sg = "1241";
$xml = simplexml_load_file($xmlfile);
foreach($xml->result->rowset->row as $row){
if ((string)$row['groupID'] == $sg)
{
foreach($row->rowset->row as $row1)
{
$typename = (string)$row1['typeName'];
$typeid = (string)$row1['typeID'];
$public = (string)$row1['published'];
$description = (string)$row1->description;
$groupid = (string)$row1['groupID'];
$primaryattr = (string)$row1->requiredAttributes->primaryAttribute;
$secondaryattr = (string)$row1->requiredAttributes->secondaryAttribute;
$rank = (string)$row1->rank;
$cost = "0";
echo $typeid . " " . $typename . " " . $description . " " . $public . " " . $groupid . " " . $primaryattr . " " . $secondaryattr . " " . $rank . " " . $cost . " " "<br>";
}
}
}
?>
Parse error: syntax error, unexpected '"<br>"' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /in/2E1EB on line 99
Process exited with code 255.