note 56104 added to ref.tidy
| From: | tom at expresshosting dot net | Date: | Tue, 23 Aug 2005 17:50:49 +0000 |
| Subject: | note 56104 added to ref.tidy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94088@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/ref.tidy.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56104
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56104&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56104&report=yes
Search -- http://master.php.net/manage/user-notes.php