note 16877 added to function.file

From: Date: Fri, 16 Nov 2001 19:39:59 +0000
Subject: note 16877 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-20936@lists.php.net to get a copy of this message
To remove only the newline character from the end of the lines use these functions instead of chop() because chop not only delete the newline character but also tabs, spaces, ... $line = substr($line,0,strlen($line)-1); (or) $line = ereg_replace("(\n|\r)+$","",$line); -- http://www.php.net/manual/en/function.file.php http://master.php.net/manage/user-notes.php?action=edit+16877 http://master.php.net/manage/user-notes.php?action=delete+16877 http://master.php.net/manage/user-notes.php?action=reject+16877

« previous php.notes (#20936) next »