PHP code example of futape / html-utility

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

    

futape / html-utility example snippets


use Futape\Utility\Html\Html;

echo Html::preformatted("PHP is <3\n Foo   Bar\nBaz\tBam ");
// "PHP is &lt;3<br />\n&nbsp;Foo &nbsp; Bar<br />\nBaz&nbsp;&nbsp;&nbsp;&nbsp;Bam&nbsp;"

use Futape\Utility\Html\HtmlInliner;

echo (new HtmlInliner(file_get_contents('./markup.html')))->render();
// "A markup file This is just a file containing HTML markup. A list of very important stuff: One, Two, And a list of definitions: WWW: World Wide Web, HTTP: Hypertext Transfer Protocol,"