note 87937 deleted from function.basename by danbrown

From: Date: Wed, 31 Dec 2008 18:52:37 +0000
Subject: note 87937 deleted from function.basename by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148722@lists.php.net to get a copy of this message
Note Submitter: myname87 at gmail dot com ---- sven_pauli you are wrong the space is at the beginnung of the string, so '/foo/bar.jpg' will be ' /foo/bar.jpg' and basename will return 'bar.jpg'. if you ltrim it, you will still have 'bar.jpg' but substr will return 'ar.jpg'; the substr-method works only if you have the basename already and in this case the use of basename is unnecessary ;)

« previous php.notes (#148722) next »