PHP code example of phore / html

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

    

phore / html example snippets


// Create a div element:
$elem = fhtml("div @id=main @class=website");

// Append a <div id=content> to the 
$elem[] = [
    "div @id=content" => "Some Content"
];

// Append paragraph to content div: 
$elem["?#content"][] = ["p" => "Some escaped content"];

// Render full page including html-header
echo $elem->renderPage();