0

I'm stuck in figuring this out. I used nl2br() to keep the line break (turn new line into html break tag), example I have value hello <br/> yeah in my textarea, but when I echo it to a textarea value it's echoed as:

hello <br/ >\r\nyeah

instead of:

hello
yeah

This is the text area code I get from inspect element:

<textarea placeholder="Max 40.000 Huruf" style="overflow-x:none;width:99%;height:300px;" type="text" name="jawaban" maxlength="40000">
hello&lt;br /&gt;\r\nyeah
</textarea>

Why is this happening?

screenshot:

error

I'm not skilled at javascript.

and if there's previous post / php method that could fix this, tell me.

Nissa
  • 4,636
  • 8
  • 29
  • 37

0 Answers0