Re: SQL Server 7 help needed!!!
| From: | Daniel Beulshausen | Date: | Wed, 03 Jan 2001 22:21:07 +0000 |
| Subject: | Re: SQL Server 7 help needed!!! | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4780@lists.php.net to get a copy of this message | ||
At 15:56 03.01.2001 -0500, Romulo Roberto Pereira wrote:
The problem is that the users that use the site to post info are investors and technical financial people and most of the times their texts are 10 to 25 pages long. What they do is copy and paste in a <textarea> - by the way - this function: // fix text $text = nl2br($text); $text = ereg_replace("\n", "", $text); $text = ereg_replace("\r", "", $text); $text = ereg_replace("'", "'", $text);why aren't you doing this in one regex? untested: $string = preg_replace(array("/(\r\n?|\n)/", "/'/"), array("<br>", "'"), $string); daniel /*-- daniel beulshausen - daniel@php4win.de using php on windows? http://www.php4win.de