PHP code example of shish / microhtml

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

    

shish / microhtml example snippets




use function MicroHTML\{HTML,SECTION,H1,P,DIV};

$page = HTML(
	SECTION(["id"=>"news"],
		H1("My title"),
		P("Here's some content")
	)
);

$page->appendChild(
	SECTION(["id"=>"comments"],
		DIV("Oh noes: <script>alert('a haxxor is attacking us');</script>")
	)
);

print($page);