Re: end of line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would start with a <p>, then print the data from the database,
str_replace("\n","<p></p>",$string); and then end with a </p>, that way you
have opening and closing <p></p> tags.

-- 


-------------------------------------------------------------->>
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
<<--------------------------------------------------------------
"Marcjon" <marcjon@xxxxxxxxxxx> wrote in message
news:1093844358.24698.203307089@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Try this:
> echo str_replace ( "\n", "<p>", $string);
>
> I believe it always stores newlines as \n, since PHP and MySQL are
> native to Unix/Linux.
> -- 
>   Marcjon

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux