1. Go to this page and download the library: Download gin0115/elmishphp-html 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/ */
gin0115 / elmishphp-html example snippets
use function Gin0115\ElmishPHP\HTML\div;
use function Gin0115\ElmishPHP\HTML\span;
use function Gin0115\ElmishPHP\HTML\p;
use function Gin0115\ElmishPHP\HTML\text;
echo div(['id' => 'wrap', 'class' => 'card'])(
p()(text('Hello, '), span(['class' => 'name'])(text('world'))),
);
div([
'id' => 'foo', // standard key=value — value is HTML-escaped
'data-flag' => null, // null value → bare flag attribute
'data-other', // positional entry → bare flag attribute
])(text('hi'));