note 21917 added to function.chop

From: Date: Fri, 31 May 2002 04:16:07 +0000
Subject: note 21917 added to function.chop
Groups: php.notes 
Request: Send a blank email to php-notes+get-31256@lists.php.net to get a copy of this message
Correction...the above example is similar to chop, not chomp. Below is an example of chomp. $mystr1 = "This is my string\n"; // Similar to chomp. Removes newline at end of string // if and only if newline character is at the end. $mystr1 = preg_replace("/\n$/", "", $mystr1); -- http://www.php.net/manual/en/function.chop.php http://master.php.net/manage/user-notes.php?action=edit+21917 http://master.php.net/manage/user-notes.php?action=delete+21917 http://master.php.net/manage/user-notes.php?action=reject+21917

« previous php.notes (#31256) next »