PHP code example of sb15 / xml-string-to-php-array

1. Go to this page and download the library: Download sb15/xml-string-to-php-array library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sb15 / xml-string-to-php-array example snippets


      $a = json_decode(json_encode((array) simplexml_load_string($s)),1);