tidy_parse_stringParse a document stored in a string
&reftitle.description;
Procedural style:tidytidy_parse_stringstringinputmixedconfigstringencodingObject oriented style:booltidy->parseStringstringinputmixedconfigstringencoding
Parses a document stored in a string.
&reftitle.parameters;
input
The data to be parsed.
config
The config config can be passed either as an
array or as a string. If a string is passed, it is interpreted as the
name of the configuration file, otherwise, it is interpreted as the
options themselves.
Check http://tidy.sourceforge.net/docs/quickref.html for an
explanation about each option.
encoding
The encoding parameter sets the encoding for
input/output documents. The possible values for encoding are: ascii,
latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16,
utf16le, utf16be, big5 and shiftjis.
&reftitle.returnvalues;
Returns a new tidy instance.
&reftitle.examples;
tidy_parse_string exampletest
error another line
TRUE,
'output-xhtml' => TRUE,
'wrap' => 200);
$tidy = tidy_parse_string($buffer, $config, 'UTF8');
$tidy->cleanRepair();
echo $tidy;
?>
]]>