PHP code example of ratrijs / html-builder

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

    

ratrijs / html-builder example snippets



$html = new HTMLBuilder;


$html = HTMLBuilder::dispatch();


echo HTMLBuilder::dispatch()->p("Hello World");


echo HTMLBuilder::dispatch()->open()->div()->p("Hello World");


echo HTMLBuilder::dispatch()->open("div")->p("Hello World");