dev-master
9999999-devConversion from xml to array
MIT
The Requires
- php >=7.1
The Development Requires
by Tahir Raza
1.0
1.0.0.0Conversion from xml to array
MIT
The Requires
- php >=7.1
The Development Requires
by Tahir Raza
Wallogit.com
2017 © Pedro Peláez
Conversion from xml to array
A package inspired by vyuldashev/xml-to-array to convert an xml to array, (*1)
Inspired by Vyuldashev's xml-to-array ❤️, (*2)
You can install this package via composer., (*3)
``` bash composer require alyjee/from-xml-to-array, (*4)
## Usage ```php use Alyjee\XmlToArray\XmlToArray; $xml = '<items><Facilities><Facility Code="*EC"></Facility><Facility Code="*LF"></Facility><Facility Code="*RS"></Facility></Facilities></items>'; $result = XmlToArray::convert($xml);
After running this piece of code $result will contain:, (*5)
Array
(
[items] => Array
(
[Facilities] => Array
(
[Facility] => Array
(
[0] => Array
(
[_attributes] => Array
(
[Code] => *EC
)
[_cdata] => Earliest check-in at 14:00
)
[1] => Array
(
[_attributes] => Array
(
[Code] => *LF
)
[_cdata] => 1 lift
)
[2] => Array
(
[_attributes] => Array
(
[Code] => *RS
)
[_cdata] => Room Service from 18:00 to 21:00
)
)
)
)
)
Conversion from xml to array
MIT
Conversion from xml to array
MIT