Re: How to detect a line break in a multiline textfield
- From: "Ciaran" <cronoklee@xxxxxxxxxxx>
- Date: 28 Feb 2007 06:30:28 -0800
Thanks for the reply Hendri. I got it sorted out using a simple find
and replace I found by searching for nl2br thanks to your second
post.
Converting textarea line breaks to <br> in PHP
$result = str_replace(array("\r\n", "\r", "\n"), "<br />",
$thestring);
Converting <br> to textarea line breaks in PHP:
$result= str_replace(array("<br/>", "<br>", "<br />"), "\n",
$thestring);
Hope this helps someone,
Ciarán
.
- References:
- How to detect a line break in a multiline textfield
- From: Ciaran
- Re: How to detect a line break in a multiline textfield
- From: Hendri Kurniawan
- Re: How to detect a line break in a multiline textfield
- From: Hendri Kurniawan
- How to detect a line break in a multiline textfield
- Prev by Date: SoapClient: __doRequest doesn't get XML SOAP Request in its $request parameter?
- Next by Date: Re: re-using variables
- Previous by thread: Re: How to detect a line break in a multiline textfield
- Next by thread: How can I change a file's date?
- Index(es):
Relevant Pages
|