parseString takes a string and creates a new tidy instance. cleanRepair cleans and restores the contents of this tidy instance. You can then get the finished HTML by converting a tidy instance, for example. echo .
repairString basically does it all in one go. This combination of actions is the most common option, so this is a quick access method. Note that it returns a string, while parseString returns a new tidy instance, and cleanRepair returns a boolean value to indicate whether the operation was successful.
So this is the (approximately) equivalent:
$tidy = new Tidy; $tidy->parseString($yourHTML); $tidy->cleanRepair(); echo $tidy; $tidy = new Tidy; echo $tidy->repairString($yourHTML);
source share