1. Go to this page and download the library: Download rauwebieten/php-html-gen 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/ */
rauwebieten / php-html-gen example snippets
// import the helper
use RauweBieten\PhpHtmlGen\HTML as h;
// a singular HTML tag
$img = h::singular('img', ['src' => 'https://example.com/img/my-logo.png']);
// a singular HTML tag, alternative syntax
$img = h::img(['src' => 'https://example.com/img/my-logo.png']);
$ruler = h::hr();
// a paired HTML tag
$fieldset = h::paired('fieldset', 'Fieldset content', ['id' => 'my-id']);
// a paired HTML tag, alternative syntax
$fieldset = h::fieldset('Fieldset content', ['id' => 'my-id']);
use RauweBieten\PhpHtmlGen\HTML as h;
= h::fieldset($legend . "My fieldset content");
$html = (string) $fieldset;
print $html;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.