-
21 Aug 2007 6:21 AM #1
Issue setting value in TextArea
Issue setting value in TextArea
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:
FhanksPHP Code:$text = "Frist Line
Second Line
Third Line";
When you have a hammer everything looks like a nail
-
26 Nov 2007 12:29 PM #2
-
25 Apr 2012 11:39 PM #3
Replace the textarea value like follow:
replace('\n','<br>')) this will add new line to the text
Sasidhar



Reply With Quote