<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Updates the configuration settings for the specified tidy document</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.tidy-set-encoding.html">tidy_set_encoding</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.tidy-warning-count.html">tidy_warning_count</a></div> <div class="up"><a href="ref.tidy.html">Tidy Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.tidy-setopt" class="refentry"> <div class="refnamediv"> <h1 class="refname">tidy_setopt</h1> <p class="verinfo">(PECL tidy >= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_setopt</span> — <span class="dc-title">Updates the configuration settings for the specified tidy document</span></p> </div> <div class="refsect1 description" id="refsect1-function.tidy-setopt-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>tidy_setopt</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$option</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span> )</div> <p class="para rdfs-comment"> <span class="function"><strong>tidy_setopt()</strong></span> updates the specified <em><code class="parameter">option</code></em> with a new <em><code class="parameter">value</code></em>. </p> </div> <div class="refsect1 parameters" id="refsect1-function.tidy-setopt-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">option</code></em></span> <dd> <p class="para"> The tidy option name. A list of available configuration options may be found at: <a href="http://tidy.sourceforge.net/docs/quickref.html" class="link external">» http://tidy.sourceforge.net/docs/quickref.html</a>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">value</code></em></span> <dd> <p class="para"> The tidy option name. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.tidy-setopt-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 examples" id="refsect1-function.tidy-setopt-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-4074"> <p><strong>Example #1 <span class="function"><strong>tidy_setopt()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$html </span><span style="color: #007700">= </span><span style="color: #DD0000">'<p>test</i>'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$tidy </span><span style="color: #007700">= </span><span style="color: #0000BB">tidy_parse_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">tidy_setopt</span><span style="color: #007700">(</span><span style="color: #DD0000">'indent'</span><span style="color: #007700">, </span><span style="color: #0000BB">FALSE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 notes" id="refsect1-function.tidy-setopt-notes"> <h3 class="title">Notes</h3> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">This function is only available in Tidy 1.0. It became obsolete in Tidy 2.0, and thus has been removed. </span></p></blockquote> </div> <div class="refsect1 seealso" id="refsect1-function.tidy-setopt-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"> <span class="function"><a href="tidy.getopt.html" class="function" rel="rdfs-seeAlso">tidy_getopt()</a> - Returns the value of the specified configuration option for the tidy document</span></li> <li class="member"> <span class="function"><a href="tidy.getconfig.html" class="function" rel="rdfs-seeAlso">tidy_get_config()</a> - Get current Tidy configuration</span></li> <li class="member"> <span class="function"><a href="function.tidy-reset-config.html" class="function" rel="rdfs-seeAlso">tidy_reset_config()</a> - Restore Tidy configuration to default values</span></li> <li class="member"> <span class="function"><a href="function.tidy-save-config.html" class="function" rel="rdfs-seeAlso">tidy_save_config()</a> - Save current settings to named file</span></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.tidy-set-encoding.html">tidy_set_encoding</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.tidy-warning-count.html">tidy_warning_count</a></div> <div class="up"><a href="ref.tidy.html">Tidy Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>