1. Go to this page and download the library: Download klan1/k1.lib-dom 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/ */
klan1 / k1.lib-dom example snippets
use \k1lib\html\DOM as DOM;
DOM::start('en');
$head = DOM::html()->head();
$body = DOM::html()->body();
$head->set_title("Simple example");
$p = new \k1lib\html\p("Helo world", "class-here", "id-here");
$p->append_to($body);
echo DOM::generate();
use \k1lib\html\DOM as DOM;
DOM::start();
DOM::html()->head()->set_title("Simple example");
DOM::html()->body()->append_p("Helo world", "class-here", "id-here");
echo DOM::generate();