@ 2014-09-28T22:54:00Z <?php
$xml = <<< EOT
<?xml version='1.0' encoding='UTF-8'?>
<response>
<apiKey id="1" apikey="1474C404-1DB4-4EA0-B2C2-516E86CB4F69">API key ok.</apiKey>
<apiKeyMessage>...</apiKeyMessage>
<Configuration VisibileToDeveloper="True">...</Configuration>
<propertySearchSales>
<properties rentalperiod="0">
<pages page="1" count="6" pageCount="1" perPage="10">
<page number="1" selected="true"/>
</pages>
<property id="2225088" eaid="1221" bid="1953" rescomnew="1" longitude="33.0225" latitude="34.70676" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€26,000" priceVal="26000" currency="EUR" rentalperiod="1" updated="19/9/2013 14:25:59" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2827" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<property id="2242068" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€29,770" priceVal="29770" currency="EUR" rentalperiod="1" updated="17/8/2011 08:55:20" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2707" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<property id="2242067" eaid="1221" bid="1953" rescomnew="1" longitude="33.0225" latitude="34.70676" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,200" priceVal="31200" currency="EUR" rentalperiod="1" updated="19/9/2013 14:26:27" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2810" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<property id="2242066" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,525" priceVal="31525" currency="EUR" rentalperiod="1" updated="18/7/2011 13:43:07" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2705" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<property id="2241909" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,850" priceVal="31850" currency="EUR" rentalperiod="1" updated="13/3/2013 06:37:23" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2803" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<property id="2242117" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€33,345" priceVal="33345" currency="EUR" rentalperiod="1" updated="18/7/2011 13:20:26" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2701" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property>
<searchParameters minPrice="0" maxPrice="99999999" branchList="" eaid="1221" propertyType="" listDefsPropertyType="" bedrooms="0" bathrooms="0" receptions="0" garages="0" gardens="0" parkingSpaces="0" showSTC="" allAddressFields="Croatia" sa1="" sa2="" town="" city="" county="" postcode="" location="" locationAND="" classification="" descending="" currency="" page="1" perPage="10" sessionGUID="53b8fbf5-6a0e-4f3e-a703-a0fbcdaf7606"/>
</properties>
</propertySearchSales>
</response>
EOT;
$simpleXML = simplexml_load_string($xml); // Load XML string data into the simplexml object parser
foreach ($simpleXML->result->rowset->row as $row) {
$titles = [];
$name = $row['name']->__toString();
foreach($row as $attrib){
if($attrib['name']->__toString() === 'titles'){
foreach($attrib as $title){
$titles[] = $title['titleName']->__toString();
}
}
}
echo $name . ' : ' . implode(' - ', $titles) . "<br/>\n";
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Warning: Attempt to read property "row" on null in /in/iiNQb on line 27
Warning: foreach() argument must be of type array|object, null given in /in/iiNQb on line 27
Output for 7.2.29 - 7.2.33 , 7.3.16 - 7.3.31 , 7.4.0 - 7.4.33 Notice: Trying to get property 'row' of non-object in /in/iiNQb on line 27
Warning: Invalid argument supplied for foreach() in /in/iiNQb on line 27
Output for 7.3.32 - 7.3.33 Warning: Invalid argument supplied for foreach() in /in/iiNQb on line 27
Output for 5.4.0 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.8 - 5.6.28 , 7.0.0 - 7.0.20 , 7.1.0 - 7.1.10 Notice: Trying to get property of non-object in /in/iiNQb on line 27
Warning: Invalid argument supplied for foreach() in /in/iiNQb on line 27
Output for 4.4.3 - 4.4.9 , 5.1.0 - 5.1.1 , 5.1.3 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 Parse error: syntax error, unexpected '[' in /in/iiNQb on line 28
Process exited with code 255 . Output for 4.4.2 , 5.1.2 Parse error: syntax error, unexpected '[' in /in/iiNQb on line 29
Process exited with code 255 . Output for 4.3.0 - 4.3.1 , 4.3.5 - 4.3.11 , 4.4.0 - 4.4.1 , 5.0.0 - 5.0.5 Parse error: parse error, unexpected '[' in /in/iiNQb on line 28
Process exited with code 255 . Output for 4.3.2 - 4.3.4 Parse error: parse error in /in/iiNQb on line 28
Process exited with code 255 . preferences:dark mode live preview
192.53 ms | 401 KiB | 309 Q