Exemplo n.º 1
0
<?php

$tidy = new tidy();
$config = $tidy->getConfig();
ksort($config);
foreach ($config as $opt => $val) {
    if (!($doc = $tidy->getOptDoc($opt))) {
        $doc = 'no documentation available!';
    }
    $val = $tidy->getOpt($opt) === true ? 'true' : $val;
    $val = $tidy->getOpt($opt) === false ? 'false' : $val;
    echo "<p><b>{$opt}</b> (default: '{$val}')<br />" . "{$doc}</p><hr />\n";
}
?>
 
Exemplo n.º 2
0
<?php

$buffer = '<html></html>';
$config = array('indent' => true, 'indent-attributes' => true, 'indent-spaces' => 3, 'language' => 'de');
// String
$tidy = new tidy();
$tidy->parseString($buffer, $config);
$c = $tidy->getConfig();
var_dump($c['indent']);
var_dump($c['indent-attributes']);
var_dump($c['indent-spaces']);
var_dump($c['language']);