PHP解析内容

时间:2015-03-02 08:04:51

标签: php xml foreach

我在PHP的变量中有这个内容。 如何在一个变量中创建字段名称,在另一个变量中创建值?

<Transaction id="1">
<Table name="if_802_11_stats">
<Body status="0" statusdescription="" startrecord="1" endrecord="242"     totalrecords="242">
<Entry status="0">
<Field name="IfIndex">1</Field>
<Field name="NodeType">ap</Field>
</Entry>
<Entry status="0">
<Field name="IfIndex">2</Field>
<Field name="NodeType">ap</Field>
</Entry>
</Body>
</Table>
</Transaction>

0 个答案:

没有答案