note 8360 deleted from function.str-replace by victor
| From: | victor@php.net | Date: | Sat, 09 Nov 2002 18:04:58 +0000 |
| Subject: | note 8360 deleted from function.str-replace by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39223@lists.php.net to get a copy of this message | ||
[Editor's note: Simpler solution: $string = chop($string)."%0a"; ]
Sometimes you want to pass a string with line breaks in it through HTTP while keeping the integrity
of the original string. To do this replace the newline characters with the HTTP friendly
"%0a".
ex.
$string = preg_replace("/\r\n|\n\r|\n|\r/", "%0a", $string);