PDA

View Full Version : Issue setting value in TextArea



franzisk
21 Aug 2007, 6:21 AM
How can I put text with line-breaks in TextArea?
It always says "unterminated string literal" and show the first part of the text before the first \n

Let's say I have this in PHP:

$text = "Frist Line
Second Line
Third Line";

Fhanks

Phpex
26 Nov 2007, 12:29 PM
For future references Check out : http://extjs.com/forum/showthread.php?p=91563

Sasidhar.Gogula
25 Apr 2012, 11:39 PM
Replace the textarea value like follow:

replace('\n','<br>')) this will add new line to the text

Sasidhar