For debugging I want to echo or print my MySQL with html replacements for the nl and horizontal tabs.
$sql="
SELECT
*
FROM
`mytable`;";
I can do echo nl2br($sql); in order to replace \n with <br />. This gives me the screen output:
SELECT
*
FROM
`mytable`;
Now I want to swap the horizontal tabs for something like in order to indent them on the screen.
What could I use instead of , I’ve never liked it?
Thanks
You could use the HTML
<pre>tag.