How do I make the html source formatting in php
Sample:
<?
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);
?>
i want to be this:
<html>
<div>
<div>2.</div>
<div>
<div>4.</div>
<div>4.</div>
</div>
<div>2.</div>
<div>2.</div>
</div>
</html>
i can't find source in net, please help me...