cvs: phpdoc /en/reference/tidy reference.xml

From: Date: Fri, 03 Dec 2004 15:56:39 +0000
Subject: cvs: phpdoc /en/reference/tidy reference.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969365348@lists.php.net to get a copy of this message
aidan Fri Dec 3 10:56:39 2004 EDT Modified files: /phpdoc/en/reference/tidy reference.xml Log: Added example http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/reference.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/tidy/reference.xml diff -u phpdoc/en/reference/tidy/reference.xml:1.6 phpdoc/en/reference/tidy/reference.xml:1.7 --- phpdoc/en/reference/tidy/reference.xml:1.6 Thu Aug 12 21:00:48 2004 +++ phpdoc/en/reference/tidy/reference.xml Fri Dec 3 10:56:39 2004 @@ -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

« previous php.doc (#969365348) next »