August 4, 2010
Text to HTML in PHP
Question by user409257
nl2br(); can do for EOL but what about white spaces and/or tabs at the beginning(or not) of line? Is there any function to do this at once? I need well formatted html output of text file.
Thx.
Answer by Starx
well may be <pre>....</pre>
can do it
also see
htmlspecialchars()
http://php.net/manual/en/function.htmlspecialchars.php
htmlentities()