mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@174001 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1cb7252cf1
commit
7980b2fa07
1 changed files with 36 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue