Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Community News:
Tidy Your Way To Better Code
Sep 16, 2003 @ 12:26:11

So you're not the cleanest coder in the world, but you can read your own source just fine. Well, unfortunately, that might not be enough down the line when someone else has to support it. So, if you have issues with the tab key or think 80 characters is just not long enough for a line, you might look into this extension for PHP to help you out.

The PHP Tidy Extension is an extension for PHP written by John Coggeshall for PHP 5 which allows PHP developers to take advantage of the power of the Tidy HTML library (which can be found at SourceForge) to parse, diagnose, clean and repair any HTML document. Downloading and installing the Tidy extension is a fairly straightforward process. Simply download the latest version of the tidy library from their homepage and then grab the latest release of Tidy from PECL.

There are all sorts of options that use can use this handy tool for, including just cleaning up HTML source, showing a dump of all of the tags/values in a HTML document, and extracting the URLs from the anchor tags in a file. So, if this sounds like just the thing your sloppy code has been looking for, check it out today!

tagged:

Link:


Trending Topics: