note 16877 deleted from function.file by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 22:13:13 +0000 |
| Subject: | note 16877 deleted from function.file by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22282@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);