Hi there I have the following XML code:
<?xml version="1.0" encoding="UTF-8"?>
<connector_ret>
<function name="search">
<row id="1">
<col id="1">AAA</col>
<col id="2">243168</col>
<col id="3">090828-000300</col>
<col id="4">Subject</col>
</row>
<row id="2">
<col id="1">BBB</col>
<col id="2">243515</col>
<col id="3">090831-000116</col>
<col id="4">Subject</col>
</row>
<row id="3">
<col id="1">BBB</col>
<col id="2">244913</col>
<col id="3">090905-000022</col>
<col id="4">Subject</col>
</row>
<row id="4">
<col id="1">CCC</col>
<col id="2">245323</col>
<col id="3">090907-000253</col>
<col id="4">Subject</col>
</row>
<row id="5">
<col id="1">CCC</col>
<col id="2">245323</col>
<col id="3">090907-000253</col>
<col id="4">Subject</col>
</row>
</function>
</connector_ret>
I was wondering if it was possible to loop through this in PHP4 and only display certain rows when given a variable.
For example if the variable given is BBB then only display rows where the first column id is also equal to BBB.
So the output would be:
BBB - 243515 - 090831-000116 - Subject BBB - 244913 - 090905-000022 - Subject
and the other rows are just ignored.
If the variable given is AAA the output would be:
AAA - 243168 - 090828-000300 - Subject
You get the idea :)
If you can help that'd be fantastic. Thanks so much.