note 125464 added to tidy.examples.basic
| From: | mmeisam at gmail dot com | Date: | Sun, 25 Oct 2020 23:58:58 +0000 |
| Subject: | note 125464 added to tidy.examples.basic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-215651@lists.php.net to get a copy of this message | ||
If you're using tidy to clean up your HTML but only want your string formatted and not the
whole html and head tag, you can use the following configuration array:
<?php
$config = [
'indent' => true,
'output-xhtml' => false,
'show-body-only' => true
];
$tidy = new tidy;
$tidy->parseString($your_html_code, $config, 'utf8');
$tidy->cleanRepair();
echo $tidy;
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.174 (proxied: 24.85.23.51)
----
Manual Page -- http://php.net/manual/en/tidy.examples.basic.php
Edit -- https://master.php.net/note/edit/125464
Del: integrated -- https://master.php.net/note/delete/125464/integrated
Del: useless -- https://master.php.net/note/delete/125464/useless
Del: bad code -- https://master.php.net/note/delete/125464/bad+code
Del: spam -- https://master.php.net/note/delete/125464/spam
Del: non-english -- https://master.php.net/note/delete/125464/non-english
Del: in docs -- https://master.php.net/note/delete/125464/in+docs
Del: other reasons-- https://master.php.net/note/delete/125464
Reject -- https://master.php.net/note/reject/125464
Search -- https://master.php.net/manage/user-notes.php