jaxwilko / elemental
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/jaxwilko/elemental
Requires
- symfony/var-dumper: ^4.2
This package is auto-updated.
Last update: 2025-09-23 11:51:54 UTC
README
This package offers a fluent html api for php.
As a simple example the following php:
<?php require __DIR__ . '/vendor/autoload.php'; echo element('div') ->addClass('container') ->addChild(element('span')->text('this is a hat')) ->addChild( element('div') ->addChild(element('span')->addClass('something')->text('words')) ->addChild(element('input')->type('number')->value('666')) ) ->addChild(element('img')->src('https://example.com/img.png'));
Will print:
<div class="container"> <span>this is a hat</span> <div> <span class="something">words</span> <input type="number" value="666"> </div> <img src="https://example.com/img.png"> </div>