fyre / htmlhelper
A HTML helper library.
v2.0.8
2024-06-29 01:49 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.59
- fyre/php-cs-fixer-config: ^1.0
- phpunit/phpunit: ^10
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;
Methods
Attributes
Generate an attribute string.
$options
is an array containing the attributes.
$attributes = HtmlHelper::attributes($options);
Escape
Escape characters in a string for use in HTML.
$string
is the string to escape.
$escaped = HtmlHelper::escape($string);
Get Charset
Get the character set.
$charset = HtmlHelper::getCharset();
Set Charset
Set the character set.
$charset
is a string representing the character set.
HtmlHelper::setCharset($charset);