Re: [PHP] entering in text data and losing the \n

From: John Nichel (jnichel_at_by-tor.com)
Date: 11/30/03


Date: Sun, 30 Nov 2003 00:15:23 -0600
To: Randy Johnson <rjohnson@seasidepc.com>

Randy Johnson wrote:

> I have a form with a text area.
>
> When the user submits the data it is saved to a mysql database in a field of type text.
>
> When I extract the data from the database and display it in php it loses the line return and the data is all crammed together. Here is an example
>
> This is line 1
> This is line 2
> This is line 3
>
> Here is what it would be after I extracted it and displayed it to the screen
>
> This is line 1 This is line 2 This is line 3

Displayed to the screen, as in....browser window, or terminal?

> What do I need to do to get it to retain the line feeds?
>
> Thanks
>
> Randy

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com


Relevant Pages

  • Re: Why is this script so slow?
    ... | mysql database that has about 250 records in it. ... | When I use another script to extract the same data and display the ... | I can only conclude it is the script. ...
    (alt.php)
  • Re: Why is this script so slow?
    ... mysql database that has about 250 records in it. ... When I use another script to extract the same data and display the ... If it is a browser rendering problem then it could be confusion in the ...
    (alt.php)
  • entering in text data and losing the
    ... When the user submits the data it is saved to a mysql database in a field of type text. ... When I extract the data from the database and display it in php it loses the line return and the data is all crammed together. ... Randy ...
    (php.general)
  • Why is this script so slow?
    ... mysql database that has about 250 records in it. ... When I use another script to extract the same data and display the ... I can only conclude it is the script. ...
    (alt.php)
  • SQL object to int
    ... I have a MySQL database; two of the columns are int. ... I wrote a method to extract a tuple and put it into an ... ObjectmyData; using getObject ... Using trial and error, the following works, but it looks awful. ...
    (comp.lang.java.programmer)