如何讓我的HTML源代碼的PHP格式化如何讓我的html源代碼格式化
樣品:
<?
ob_start();
$mixed_output =
"<div><div>2.</div><div>
<div>4.</div>
<div>4.</div>
</div> <div>2.</div>
<div>2.</div>
</div>";
echo format_mixed_output($mixed_output);
?>
我想是這樣的:
<html>
<div>
<div>2.</div>
<div>
<div>4.</div>
<div>4.</div>
</div>
<div>2.</div>
<div>2.</div>
</div>
</html>
我找不到網源,請幫我...
檢查:http://stackoverflow.com/questions/768215/php-pretty-print-html-not-整潔 – Gabriel 2011-06-01 23:12:08
thenks,但不運行,http://www.coderun.com/ide/?w=d35PTnzNW0-Pwk2Fnry6GA – misima 2011-06-01 23:27:08