PHP code example of bystro / html-table-converter

1. Go to this page and download the library: Download bystro/html-table-converter 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/ */

    

bystro / html-table-converter example snippets




$converter = HtmlTableConverter\HtmlTableConverterFactory::fromHtml($tableHtml);
var_dump($converter->convert()); 




$converter = HtmlTableConverter\HtmlTableConverterFactory::fromHtml($tableHtml);
$converter->stripTagsFromColumnValues();
var_dump($converter->convert()); 




$converter = HtmlTableConverter\HtmlTableConverterFactory::fromHtml($tableHtml);
$converter->doNotIncludeHeaderRowInResult();
var_dump($converter->convert()); 




$converter = HtmlTableConverter\HtmlTableConverterFactory::fromHtml($tableHtml);
$converter->convert(\HtmlTableConverter\Converter\Type::JSON);