Output

Obtaining the resulting output of tidy repairing a document is fairly simple.

<?php
// Procedural
$output = tidy_get_output($tidy);
// Object-oriented $output = (string) $tidy;
?>

While the object-oriented API offers no public declaration of the magic method     toString, it can be cast to a string as well as output directly using the echo construct.


© Tidy Extension — Web Scraping

>>> Back to TABLE OF CONTENTS <<<
Category: Article | Added by: Marsipan (01.09.2014)
Views: 372 | Rating: 0.0/0
Total comments: 0
avatar