added documentation and example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@149253 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2004-01-19 19:59:16 +00:00
parent 4363f73697
commit 97b2f25526

View file

@ -1,6 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-repair-string">
<refnamediv>
<refname>tidy_repair_string</refname>
@ -14,10 +13,62 @@
<type>bool</type><methodname>tidy_repair_string</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>config_file</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
<para>
This function repairs the given string.
</para>
<para>
<example>
<title><function>tidy_repair_string</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
?>
&warn.undocumented.func;
<html>
<head>
<title>test</title>
</head>
<body>
<p>error</i>
</body>
</html>
<?php
$buffer = ob_get_clean();
$tidy = tidy_repair_string($buffer);
echo $tidy;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>test</title>
</head>
<body>
<p>error</p>
</body>
</html>
]]>
</screen>
</example>
</para>
<para>
See also <function>tidy_parse_file</function>,
<function>tidy_parse_string</function> and
<function>tidy_repair_file</function>.
</para>
&note.tidy.2only;
</refsect1>
</refentry>