I want to convert the below code from XML to PHP array using PHP 5.6 or from XML to a JSON array.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<readDataResponse xmlns="http://tempuri.org/">
<readDataResult>
<sampleItems>
<SampleModel>
<sampleId>1</sampleId>
<firstName>Amran</firstName>
<lastName>Aditya</lastName>
</SampleModel>
<SampleModel>
<sampleId>2</sampleId>
<firstName>Abeds</firstName>
<lastName>Lukman</lastName>
</SampleModel>
</sampleItems>
</readDataResult>
</readDataResponse>
</soap:Body>
</soap:Envelope>