1. Go to this page and download the library: Download nethead/markup 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/ */
nethead / markup example snippets
use Nethead\Markup\MarkupFactory as Html;
// or
use function Nethead\Markup\Helpers\tag;
// Link to Google.com
Html::anchor('https://google.com', ['Go to Google'])->blank();
// Image link
Html::anchor('https://google.com', [
Html::image('/img/google.png', 'Google Logo')
])->blank();
// Paragraph
tag('p', ['class' => 'px-2'], [
'Here is how you can search with',
tag('a', ['href' => 'https://google.com'], ['Google'])->blank()
]);
if ($menuItem->classList()->caintains('bold')) {
$menuItem->attrs()->data('modal', 'discount');
}
use Nethead\Markup\Helpers\HtmlConfig;
HtmlConfig::$closeVoids = true;
use Nethead\Markup\Helpers\IconsFactory;
use Nethead\Markup\Helpers\HtmlConfig;
HtmlConfig::$defaultIconsFactory = 'glyphicons';
print IconsFactory::icon('user');