Posted by frizzle on 03/01/06 16:22
ward@ wrote:
> Good morning.
>
> I created an edit_task page that allows the user to edit tasks for the
> database. I entered some text and used some hard returns.
>
> Put when I went to view the tasks (using a PHP script if it matters),
> the hard returns didn't "take." None of em. All of the text is
> jumbled together.
>
> Well I checked within the MySQL database just now (before uploading
> this message) and noticed the Hard Returns show in the database (at
> least while using phpMyAdmin).
>
> Must have something to do with PHP? Where did I go wrong???
>
> Thanks.
>
> --Ward
before printing the results from the DB, you should call nl2br() (
NewLine To Break )
print nl2br( $result['text'] );
More info at http://php.net/nl2br
Frizzle.
Navigation:
[Reply to this message]
|