note 39900 deleted from function.strrev by nlopess

From: Date: Thu, 17 Jun 2004 11:38:17 +0000
Subject: note 39900 deleted from function.strrev by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71220@lists.php.net to get a copy of this message
Note Submitter: webmaster __AT__ digitalanime __DOT__ nl ---- Just to let you guys know why this function can be usefull.. If you need to check what the _REAL_ extension of a file is, you can use this: <?php function return_extension($file) { $file = strrev($file); $file = explode('.', $file); return strrev($file[0]); } ?> This just reverses the filename, explodes it by the '.' and returns the reversed result, so you won't get stuck with 'config.inc.php' etcetera. Just to let you know :-)

« previous php.notes (#71220) next »