Skip to content

lcherone/php-format-html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

HTML formatter class.

A simple to use HTML prettifier class written in PHP.

Example:

<?php
include_once('format.php');

$html = 'Unformatted HTML string';

// initialize class
$format = new Format();

// use spaces at 4 length
echo $format->html($html);

// use spaces at 2 length
echo $format->html($html, true, 2);

// use tabs
echo $format->html($html, false);

Static method example:

<?php
include_once('format.php');

$html = 'Unformatted HTML string';

// use spaces at 4 length
echo Format::HTML($html);

// use spaces at 2 length
echo Format::HTML($html, true, 2);

// use tabs
echo Format::HTML($html, false);

About

A simple to use HTML prettifier/formatter class written in PHP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%