Re: trim last folder in a path



basename() does not remove the extension unless you tell it to, nor is
it limited to file names. Try it.

.