PHP code example of nazar-pc / bananahtml
1. Go to this page and download the library: Download nazar-pc/bananahtml 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/ */
nazar-pc / bananahtml example snippets
//Much easier to write:)
use nazarpc\BananaHTML as h;
echo h::p('Paragraph content');
// <p>Paragraph content</p>
echo h::{'a#github.cool-link.two-classes[href=http://github.com]'}(
'GitHub',
[
'data-is-supported' => 'yes'
]
);
//<a id="github" class="cool-link two-classes" href="http://github.com" data-is-supported="yes">
// GitHub
//</a>
echo h::{'ul.unordered-list li| span'}(
'one',
'two',
'three'
);
//<ul class="unordered-list">
// <li><span>one</span></li>
// <li><span>two</span></li>
// <li><span>three</span></li>
//</ul>