mysql php question ????? ?

  • Thread starter Thread starter the town man
  • Start date Start date
T

the town man

Guest
hi...how can you keep new lines when you print data from mysql database...
when i insert text into database through a text area , for example :

line 1 ....
line2 ....
line 3....

when i open the database the text is stored with new lines .....but when i retrieve the text it shows like this :

line 1 ......line 2.......line 3.........

thank you
 
You will need to print HTML line breaks between the data in order for it to appear on a new line.

echo("<br/>");

should help you out.
 
I think you are entering those text into the textarea as input. If you retrieve it in table, it is normally word wrapped inside the cell. If you retrieve it on textarea, the text is shown in new lines.

Try to include the <br> tag at the end of each lines that you entered in the textarea.
 
Back
Top