PHP HTMLifier

PHP HTMLifier

PHP-HTMLifier generates HTML code using PHP. This means no more echostatements or entering and exiting the PHP environment inside an HTML document. And the best part is - you can't forget to close a div because the library takes care of element generation for you! Your PHP code will be more manageable, reusable and error free.

Consider the following example PHP file (from the PHP website)

<html>
    <head>
        <title>PHP Test</title>
    </head>
    <body>
        <p><?php echo 'Hello World'; ?></p>
    </body>
</html>

Now we make the same page with PHP-HTMLifier...

<?php
$page = new Page('PHP Test');
$page->p('Hello World');

That's all there is to it!

If you've spent much time with PHP you know how quickly things can get out of hand. That's where this PHP-HTMLifier excels - you don't have to keep track of opening and closing divs and other tags.

{{ message }}

{{ 'Comments are closed.' | trans }}