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.
well may be <pre>....</pre>
can do it
also see
htmlspecialchars()
http://php.net/manual/en/function.htmlspecialchars.php
htmlentities()