php - echo a string, replacing nl with br and horizontal tabs with some html char -
for debugging want echo or print mysql html replacements nl , horizontal tabs.
$sql=" select * `mytable`;";
i can echo nl2br($sql);
in order replace \n
<br />
. gives me screen output:
select * `mytable`;
now want swap horizontal tabs
in order indent them on screen.
what use instead of
, i've never liked it?
thanks
you use html <pre>
tag.
echo '<pre>' . $sql . '</pre>';
Comments
Post a Comment