note 83674 deleted from function.trim by felipe

From: Date: Fri, 06 Jun 2008 22:54:45 +0000
Subject: note 83674 deleted from function.trim by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140197@lists.php.net to get a copy of this message
Note Submitter: deeceezzz at hotmail dot com ---- Has anyone seen this one : trim('bla', &); returns bl but trim('blo', &); returns blo I don't get why a is removed like this if placed at the end of the string, but, in case you want to make sure that no & are used at the begining or at the end of a string you'd better use : preg_replace('(^&|&$)i', '', $my_string); Hope this helps

« previous php.notes (#140197) next »