php==> goin to the next line (text area)?

echo "<textarea rows='21' name='body' cols='73'>";
while ($row = mysql_fetch_array($data))
echo $row['msg']. "<br>";
echo"</textarea>";
i am using <br> so it suppose to go to the next line in my text are but
instead of going to the next line it just prints <br> anybody knows y?

Answers:
<br> is html code, the text area as far as i know understands <br> as ordinary text.

The php processor however does understand "\n" as I must goto the next line . I am no expert(in fact I just started learning php a few months ago ) but I used your code for one of my databases and just changed the "<br>" to "\n" and it worked.

You can also use "\r", "\r" tells php to insert a carriage return,
which is similar to new line. I am not 100% sure that \r and \n are the same thing, but both will work for your script.

Other answers:
Replace "<BR>" with "\n".

  • I'm develop a blackjack game using CORBA and JAVA, Can anyone tell me of any resources. Esp dealer implement
  • what is the best way to learn php?
  • what is 300 dpi resolution? help me plzz...?
  • a working implementation of DES?
  • Adding animated text to my site?
  • How can I setup my computer at home to access a website I built in school, from outside the home on the Web.?
  • what is the concept of hard copy in C++?
  • why would anyone want to use an image map? Give several examples of appropriate and inappropriate use of image
  • Can we set timeout on Remote shell on Solaris?
  • who won the golden boot in the 1994 world cup?