PHP code example of taylornetwork / make-html

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

    

taylornetwork / make-html example snippets

 php
'providers' => [
    TaylorNetwork\MakeHTML\MakeHTMLServiceProvider::class,
];
 php
php artisan vendor:publish
 php
$text = 'Example text
with line
breaks. And a
link: http://example.com/page/1/2?q=This&that=other';
 php
$this->makeHTML($text);
 php
'Example text<br>with line<br>breaks. And a<br>link: <a href="http://example.com/page/1/2?q=This&that=other">example.com</a>'
 php
$this->getHTMLGeneratorInstance();
 php
use TaylorNetwork\MakeHTML\HTMLGenerator;

$instance = new HTMLGenerator();
 php
$instance->makeLinks($textWithLink);
 php
$textWithLineBreaks = 'This
is
text
with
line
breaks.';
 php
$instance->convertLineEndings($textWithLineBreaks);
 php
'This<br>is<br>text<br>with<br>line<br>breaks.'
 php
$instance->generateTag('div', []);
 php
'<div></div>'
 php
$instance->generateTag('div', $attributes);
 php
$instance->generateTag('div', $attributes);
 php
$instance->generateTag('div', $attributes, false);
 php
$instance->closeTag('div');
 php
'</div>'
 php
$instance->divTag($attributes);