note 55574 deleted from function.str-replace by nlopess
| From: | nlopess@php.net | Date: | Mon, 08 Aug 2005 08:18:41 +0000 |
| Subject: | note 55574 deleted from function.str-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93233@lists.php.net to get a copy of this message | ||
Note Submitter: laxwy
----
The below regular expression is out of order and will give you two line breaks. use:
<?php
$x = preg_replace('/(\r\n)|\n|\r/m', '', $x);
?>
instead