PHP/HTML/tidy parse string
Passing Tidy Options at Runtime
<?php
$options = array("show-body-only" => true);
$tidy = tidy_parse_string("<B>Hello<I>World!</B></I>", $options);
echo $tidy;
?>
Retrieving a Document from Tidy
<?php
$tidy = tidy_parse_string("<B>This is a string</B>");
$data = tidy_get_output($tidy);
echo $tidy;
?>
Using tidy_clean_repair()
<?php
$tidy = tidy_parse_string("<B>This is a simple,</I> but
<B>malformed</B> <U>HTML Document<U>");
tidy_clean_repair($tidy);
echo $tidy;
?>