Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and tidy #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions README

This file was deleted.

38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## 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('Unformatted HTML string', true, 2);

// use tabs
echo $format->html('Unformatted HTML string', 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);
Loading