note 85268 added to tidy.examples

From: Date: Fri, 22 Aug 2008 17:44:50 +0000
Subject: note 85268 added to tidy.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-143755@lists.php.net to get a copy of this message
If you're just looking for a quick and dirty way to output HTML code you created in a formatted way use this technique... <?php $html = 'a chunk of html you created'; $config = array( 'indent' => true, 'output-xml' => true, 'input-xml' => true, 'wrap' => '1000'); // Tidy $tidy = new tidy(); $tidy->parseString($html, $config, 'utf8'); $tidy->cleanRepair(); echo tidy_get_output($tidy); ?> ... This seemed to get the result I wanted every time. ---- Server IP: 64.71.164.2 Probable Submitter: 72.1.77.194 ---- Manual Page -- http://www.php.net/manual/en/tidy.examples.php Edit -- https://master.php.net/note/edit/85268 Del: integrated -- https://master.php.net/note/delete/85268/integrated Del: useless -- https://master.php.net/note/delete/85268/useless Del: bad code -- https://master.php.net/note/delete/85268/bad+code Del: spam -- https://master.php.net/note/delete/85268/spam Del: non-english -- https://master.php.net/note/delete/85268/non-english Del: in docs -- https://master.php.net/note/delete/85268/in+docs Del: other reasons-- https://master.php.net/note/delete/85268 Reject -- https://master.php.net/note/reject/85268 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143755) next »