treffynnon / HTML-DSL-for-PHP

A simple HTML DSL for PHP - ultra simple and naive

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML-DSL-for-PHP

A simple HTML DSL for PHP - ultra simple and naive.

<?php

require_once 'util.php';
require_once 'html.php';

use \Treffynnon\Html as H;

echo H\div(
    'The content of my div appears here.',
    [H\attr('class', ['my-section', 'highlight'])]
);

// Outputs the following HTML:
//
// <div class="my-section highlight">
//     The content of my div appears here
// </div>

About

A simple HTML DSL for PHP - ultra simple and naive

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 100.0%