PHP code example of ibraheem-ghazi / html-stripper
1. Go to this page and download the library: Download ibraheem-ghazi/html-stripper 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/ */
ibraheem-ghazi / html-stripper example snippets
braheemGhazi\HTMLStripper\HTMLStripper;
$str= ight','40px',HTMLStripper::LESS_THAN);//39 and less are allowed
$hss->addStyle('text-align','*',HTMLStripper::EQUAL);
$hss->addStyle('height','30px',HTMLStripper::LESS_THAN);
$hss->addStyle('width','5%',HTMLStripper::GREATER_THAN);
// ... etc
// $new_str = $hss->strip($str,true,['strong','em','p']);
$new_str = $hss->strip($str,true,['table','tr','td','th','p','br']);
echo $new_str;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.