PHP/HTML/tidy parse string — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 10:05, 26 мая 2010
Passing Tidy Options at Runtime
<source lang="html4strict">
<?php
$options = array("show-body-only" => true); $tidy = tidy_parse_string("HelloWorld!</B>", $options); echo $tidy;
?>
</source>
Retrieving a Document from Tidy
<source lang="html4strict">
<?php
$tidy = tidy_parse_string("<B>This is a string"); $data = tidy_get_output($tidy); echo $tidy;
?>
</source>
Using tidy_clean_repair()
<source lang="html4strict">
<?php
$tidy = tidy_parse_string("This is a simple,</I> but <B>malformed HTML Document<U>"); tidy_clean_repair($tidy); echo $tidy;
?>
</source>