umm nl2br doesnt work most the time ,
"nl2br -- Inserts HTML line breaks before all newlines in a string "
sorry to give a wrong example this is for splitting your content into
paragraphs obviously where there is a break in the content like so
efwojeiowerjwetwpjwewoj
eioptejoiejiojtei
it won
> /**
> * converts line break and spaces to page break
> *
> * @access public
> */
>
> function nlbr($string) {
> return preg_replace("/(\r\n|\n|\r)/", "\n", $string);
> }
ummm www.php.net/nl2br() ??
Start a new thread for your question, don't hijack someone else's thread.
---John H
I hang my head in shame... yes. As a matter of fact, I did on my second
skim through my PHP ref. manual... thanks for the pointer just the same.
- charles
On Tuesday, March 25, 2003, at 05:38 PM, CPT John W. Holmes wrote:
i have a textarea in a form which gets inserted into a table in my
databa
/**
* converts line break and spaces to page break
*
* @access public
*/
function nlbr($string) {
return preg_replace("/(\r\n|\n|\r)/", "\n", $string);
}
here is one i use , what i'm still trying to work out , its a way
> i have a textarea in a form which gets inserted into a table in my
> database (mySQL). When displaying this text back to the screen, how do
> i retain the line breaks etc. that were in the original input?
I bet if you searched for "textarea" and "line breaks" you'd of found the
nl2br() function.
At 23:30 25.03.2003, Charles Kline said:
[snip]
>i have a textarea in a form which gets inserted into a table in my
>database (mySQL). When displaying this text back to the screen, how do
>i retain the line breaks etc. that were in the original input?
-
6 matches
Mail list logo