If I have a variable:
$var1 = "Line 1 info blah blah <br /> Line 2 info blah blah";
And a text area:
<textarea>echo $var1</textarea>
How can I get the text area to display a new line instead of displaying the text on a single like with a <br />
in it?
Edit: I have tried the following:
<textarea class="hobbieTalk" id="hobbieTalk" name="hobbieTalk" cols="35" rows="5" onchange="contentHandler('userInterests',this.id,this.value,0)"><?php
$convert=$_SESSION["hobbieTalk"];
$convert = str_replace("<br />", "
", $convert);
echo $convert;
?></textarea>
However the text area still contains the br
tags in the lines.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…