note 56104 deleted from ref.tidy by cmb
| From: | cmb@php.net | Date: | Sun, 21 Oct 2018 16:40:44 +0000 |
| Subject: | note 56104 deleted from ref.tidy by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209489@lists.php.net to get a copy of this message | ||
Note Submitter: tom at expresshosting dot net
----
It should be noted that the examples on this page apply ONLY to PHP5. None of the functions in the
manual apply to PHP4. The names are the same but arguments are different on some of them
(tidy_parse_string).
If you wish to use tidy in PHP 4.3.x you can use the following example instead:
<?php
$tidyhtml = ob_get_contents();
if( function_exists( 'tidy_parse_string' ) ) {
tidy_set_encoding('iso-8859-1');
tidy_parse_string($tidyhtml);
tidy_setopt('output-xhtml', TRUE);
tidy_setopt('indent', TRUE);
tidy_setopt('indent-spaces', 2);
tidy_setopt('wrap', 200);
tidy_clean_repair();
$tidyhtml = tidy_get_output();
}
ob_end_clean();
echo $tidyhtml;
?>
Hope that helps somebody.