fyre / htmlhelper
A HTML helper library.
v3.0.1
2024-10-30 11:23 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.59
- fyre/php-cs-fixer-config: ^1.0
- phpunit/phpunit: ^11
README
FyreHTMLHelper is a free, open-source HTML helper library for PHP.
Table Of Contents
Installation
Using Composer
composer require fyre/htmlhelper
In PHP:
use Fyre\Utility\HtmlHelper;
Basic Usage
$html = new HtmlHelper();
Methods
Attributes
Generate an attribute string.
$options
is an array containing the attributes.
$attributes = $html->attributes($options);
Escape
Escape characters in a string for use in HTML.
$string
is the string to escape.
$escaped = $html->escape($string);
Get Charset
Get the character set.
$charset = $html->getCharset();
Set Charset
Set the character set.
$charset
is a string representing the character set.
$html->setCharset($charset);