SimpleXML ve aynı çocuk

0 Cevap php

Ben böyle bir kukla xml:

<SOA>
<cities>
    <area>Area1</area>
    <period>period1</period>
    <center>center1</center>
</cities>
<cities>
    <area>Area1</area>
    <period>period1</period>
    <center>center2</center>
</cities>
<cities>
    <area>Area2</area>
    <period>period1</period>
    <center>center3</center>
</cities>
</SOA>

I want to loop through the xml, my question is: How can I loop trough repeated child? e.g loop through area that area name is Area1 ? (there is 2 Area1 with center1 and center2, I want make a query like this : find all center that area is Area1) Thanks in advance

0 Cevap