PHP code example of nanaksr / htmlextractor
1. Go to this page and download the library: Download nanaksr/htmlextractor 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/ */
nanaksr / htmlextractor example snippets
use \nanaksr\htmlextractor;
$source = @file_get_contents(__DIR__ . '/yout/file/path.htm', FILE_USE_INCLUDE_PATH);
if (!$source){
echo "Data Source Not Found";
exit();
}
$tblExt = new htmlextractor;
$tblExt->source = $source;
$tblExt->anchor = 'id';
$tblExt->stripTags = true;
$tblExt->anchorWithin = true;
$tblExt->headerRow = false;
$ShowdataArray = $tblExt->extractTable();