PHP code example of vardumper / extended-htmldocument
1. Go to this page and download the library: Download vardumper/extended-htmldocument 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/ */
vardumper / extended-htmldocument example snippets
use Html\Element\Inline\Anchor;
use Html\Enum\RelEnum;
echo (new Anchor())
->setClass('secondary')
->setRel(RelEnum::NOFOLLOW)
->setHref('https://google.com')
->setTitle('Google it')
->setContent('Click me');
// produces: <a class="secondary" href="https://google.com" rel="nofollow" title="Google it">Click me</a>