This is a simple question; I will make it simple.
So I’ve got a <textarea name="textarea"> in a <form method="POST">
<?php
$textarea = $_POST['textarea'];
echo nl2br($textarea);
Solves maintaining the NEW LINES,
But how do I maintain TABS?
tab2tab() or something?
Although, not designed for this specific use, you can do:
Or if you want the HTML equivalent of a space: