fyre/htmlhelper

A HTML helper library.

v3.0.1 2024-10-30 11:23 UTC

This package is auto-updated.

Last update: 2024-10-30 11:23:49 UTC


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);