note 23394 deleted from function.basename by spic

From: Date: Tue, 17 Sep 2002 09:05:48 +0000
Subject: note 23394 deleted from function.basename by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36778@lists.php.net to get a copy of this message
In reply to: jsteele@snl.com You could also use a regexp to do that: function getext($filename) { return preg_replace("/^(.*\.)(\w*)$/", "\\2", $filename); }

« previous php.notes (#36778) next »