PHP code example of traderinteractive / column-parser

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

    

traderinteractive / column-parser example snippets


$parser = new MultispacedHeadersParser($contents);
$data = $parser->getRows();

array(
    array(
        'Name' => 'James',
        'Age' => '17',
        'City of Birth' => 'San Francisco, CA',
    ),
    array(
        'Name' => 'Mary',
        'Age' => '18',
        'City of Birth' => 'Washington, D.C.',
    ),
    array(
        'Name' => 'William',
        'Age' => '22',
        'City of Birth' => 'Dallas, TX',
    ),
);