i xml Zeile Spaltennamen mit Rohdaten haben Ich muss diese in wünschenswerte Array-Form konvertieren:convert XML-Daten in PHP-Array
<RETS ReplyCode="0" ReplyText="Operation Success.">
<DELIMITER value="09"/>
<COLUMNS>
AcresNum
ADAFeaturesYN
AdditionalFeatures
</COLUMNS>
<DATA>
0.0000 0 Ceiling Fan,Granite Counters,Multiple Attics,Security System</DATA></RETS>
I dies wie diese in Form von Array konvertieren:
array([0] => array(['AcresNum'] => 0.0000 ,
['ADAFeaturesYN'] => 0),
[1] => array(['AcresNum'] => 1.0000 ,
['ADAFeaturesYN'] => 1)
);
Sie können 'simplexml_load_string' (http://php.net/manual/en/function.simplexml-load-string.php), wenn xml in String oder' simplexml_load_file' (http: // php .net/manual/en/function.simplexml-Last-file.php), wenn Sie xML-Datei sind – Apb
ich habe versucht, aber kehrt, wie die Array ( [COLUMNS => \t AcresNum \t ADAFeaturesYN \t AdditionalFeatures \t Zusätzliche \t \t \t ) –
Prozess 'Array ([COLUMNS => AcresNum \t ADAFeaturesYN \t Addition alFeatures AdditionalInformation) 'um das gewünschte Array zu erstellen – Apb