Added example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@174001 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Aidan Lister 2004-12-03 15:56:39 +00:00
parent 1cb7252cf1
commit 7980b2fa07

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<reference id="ref.tidy">
<title>Tidy Functions</title>
@ -33,7 +33,42 @@
&reference.tidy.constants;
<section id="tidy.examples">
&reftitle.examples;
<para>
This simple example shows basic Tidy usage.
<example>
<title>Basic Tidy usage</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
?>
<html>a html document</html>
<?
$html = ob_get_clean();
// Specify configuration
$config = array(
'indent' => true,
'output-xhtml' => true,
'wrap' => 200);
// Tidy
$tidy = new tidy;
$tidy->parseString($html, $config, 'utf8');
$tidy->cleanRepair();
// Output
echo $tidy;
?>
]]>
</programlisting>
</example>
</para>
</section>
</partintro>
&reference.tidy.functions;
</reference>
<!-- Keep this comment at the end of the file