Pretty-print HTML via PHP without validation?
        Posted  
        
            by 
                brianjcohen
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by brianjcohen
        
        
        
        Published on 2010-12-24T18:03:57Z
        Indexed on 
            2010/12/24
            19:54 UTC
        
        
        Read the original article
        Hit count: 220
        
I'd like to automatically pretty-print (indentation, mostly) the HTML output that my PHP scripts generate. I've been messing with Tidy, but have found that in its efforts to validate and clean my code, Tidy is changing way too much. I know Tidy's intentions are good but I'm really just looking for an HTML beautifier. Is there a simpler library out there that can run in PHP and just do the pretty-printing? Or, is there a way to configure Tidy to skip all the validation stuff and just beautify?
© Stack Overflow or respective owner