note 27084 deleted from function.chop by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 01:06:28 +0000 |
| Subject: | note 27084 deleted from function.chop by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48312@lists.php.net to get a copy of this message | ||
Note Submitter: kurmie@wanadoo.nl
----
if you want to chop off a newline, this is the suggested method:
function chop_newline($str)
{
return preg_replace("/\r?\n$|\r[^\n]$/", "", $str);
}