I have the following string and I want to convert it to array in PHP. Is it Possible please? of yes how can I do it? I cannot think of any way to do this in PHP. Thanks.
$mystring = '<Service type="Q">
<TotalNet>
<Currency>EUR</Currency>
<Amount>197.45</Amount>
</TotalNet>
<Charges>
<Currency>EUR</Currency>
<Charge>
<ChargeType>MEDICAL EXPRESS</ChargeType>
<ChargeAmount>159.19</ChargeAmount>
</Charge>
<Charge>
<ChargeCode>FF</ChargeCode>
<ChargeType>FUEL SURCHARGE</ChargeType>
<ChargeAmount>28.26</ChargeAmount>
</Charge>
<Charge>
<ChargeCode>II</ChargeCode>
<ChargeType>SHIPMENT INSURANCE</ChargeType>
<ChargeAmount>10.00</ChargeAmount>
</Charge>
</Charges>
<DeliveryTime>2019-12-02T12:00:00</DeliveryTime>
<CutoffTime>2019-11-26T18:00:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
<Service type="8">
<TotalNet>
<Currency>EUR</Currency>
<Amount>72.00</Amount>
</TotalNet>
<Charges>
<Currency>EUR</Currency>
<Charge>
<ChargeType>EXPRESS EASY</ChargeType>
<ChargeAmount>72.00</ChargeAmount>
</Charge>
</Charges>
<DeliveryTime>2019-12-02T23:59:00</DeliveryTime>
<CutoffTime>2019-11-26T18:00:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>';