note 38903 added to function.str-replace

From: Date: Sun, 11 Jan 2004 04:59:32 +0000
Subject: note 38903 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-63300@lists.php.net to get a copy of this message
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; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38903 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38903&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38903&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63300) next »