问题How could I use PHP to format HTML code that has had all whitespace stripped? 回答1:Use HTMLTidy: http://php.net/manual/en/book.tidy.php 来源:https://stackoverflow.com/questions/4699487/formatting-html-code-in-php 标签 php html formatting