note 38903 deleted from function.str-replace by pollita
| From: | pollita@php.net | Date: | Sun, 11 Jan 2004 19:07:58 +0000 |
| Subject: | note 38903 deleted from function.str-replace by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63324@lists.php.net to get a copy of this message | ||
Note Submitter:
----
monkey has a mistake in his function. He makes
str_replace without assigning the result anywhere. His function should read:
<?php
function normalizeNewline($text){
/* fix DOS newlines */
$text = str_replace("\r\n", "\n", $text);
/* fix Mac newlines */
$text = str_replace("\r", "\n", $text);
return $text;
}
?>