O'Reilly logo

PHP 5 Unleashed by John Coggeshall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Working with HTML/XHTML Using Tidy

Introduction

Tidy is an incredibly useful extension for processing HTML, XHTML, and even XML markup from within your PHP scripts. Available since PHP 4.3.x with tidy 1.0, the tidy extension version 2.0 is part of the standard PHP 5.0 distribution boasting a new robust API for validating, repairing, and parsing markup from within PHP. In this chapter, I'll guide you through all the functionality tidy provides and show you how it can be used to effectively ensure that your markup meets the official Web standards.

Basic Tidy Usage

Parsing Input and Retrieving Output

To begin using tidy in PHP, let's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required