How to convert xml into array in php

How to convert xml into array in php

In this tutorial we are going to see how to convert xml into array in php.

In some case while calling external api calls,it gives the response as XML format at that we need to convert  convert xml into array in php.

SimpleXML is a PHP extension that allows us to easily manipulate and get XML data.

we are going to use SimpleXML to convert xml into array in php.

Eaxmple :