I am converting <br/>
into new line by following this question's answer.
I am using
<textarea name="newtext" style="margin: 0px; width: 550px; height: 120px;"><?php echo str_replace("<br />", "\r\n", $posttext['text']); ?></textarea>
for me. My code is for a edittext field.
My problem is when I am editing text like
hi
I am
here
It is showing
hi
I am
here
And when I re-editing this it comes like
hi
I am
here
What I need to do to solve this? Here one thing to mention that when I am saving this text I am using
$texttrim = trim($_POST['newtext']);
$newtexts = nl2br($texttrim);