note 28899 deleted from function.basename by alindeman

From: Date: Fri, 09 May 2003 22:12:49 +0000
Subject: note 28899 deleted from function.basename by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-47784@lists.php.net to get a copy of this message
To get the ONLY extension you can use this. <?php $path = "/home/httpd/html/index.ext"; $extension = next(explode('.', basename($path))); echo $extension; //the dot is not included ?>

« previous php.notes (#47784) next »