I have this XML and I want to get the condition code to be returned so I can use it in my further programming. Wish that i can do if $ConditionCode=“EC202020” then…
I get all information where tag is opened and closed like msg, details and so on, but need help extract this code so I can use it in cach excpetation.
<response>
<result code="1919">
<msg>Invalid information</msg>
</result>
<extension>
<conditions>
<condition code="EC101010" severity="info">
<msg>Command failed</msg>
<details>Failed to something</details>
</condition>
<condition code="EC202020" severity="error">
<msg>Mismatch</msg>
<details>More Complex Details.</details>
</condition>
</conditions>
</extension>
<trID>
<clTRID>20200227190249</clTRID>
<svTRID>20200227200249880561-zuece8-reg839-NORID</svTRID>
</trID>
</response>
My code for all other is
$error = trim($results["EPP"]["RESPONSE"]["EXTENSION"]["CONDITIONS"]["CONDITION"]["DETAILS"]);
Please advice.