How tidy Works
The most basic use of tidy within PHP is divided accross three functions:
- • tidy_parse_file($filename) - Load the specified file/URI and parse it
- • tidy_clean_repair() - Clean and repair the parsed file
- • tidy_get_output() - Returns the repaired document as a string
Cleaning up http://www.php.net/
<?php
tidy_parse_file("http://www.php.net/");
tidy_clean_repair();
echo tidy_get_output();
?>