@moondanceJul 03.2004 — #or how about a simpler alternative:
[code=php] Function GetExtension($filename) { return strrchr($filename, "."); } [/code]
strrchr looks for the last occurence of a character in a string, so this would work ok for extensions that are 2 or 4 characters long, as well as filename such as "my.pic.jpg"