PHP code example of elgentos / parser

1. Go to this page and download the library: Download elgentos/parser 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/ */

    

elgentos / parser example snippets



/**
 * Read a file, import recursive and return a merged array
 */
$data = Elgentos\Parser::readFile('file.json');


/**
 * Read a file, no recursion
 */
$data = Elgentos\Parser::readSimple('file.json');