[thelist] PHP string manipulation

Mark Joslyn Mark.Joslyn at SolimarSystems.com
Thu Jun 26 17:58:31 CDT 2003


I am having the hardest time writing a string manipulation that will take
the following:

Directory_One/Directory_Two/FileName1.zip

or

Directory_One/Filename1.zip

(the paths can have from 1 to 3 directories separated by "/")

I need everything left of the last "/" returned as a string including the
last "/" (essentially just removing the filename).

I have looked at substr, strchr, etc.. I cannot seem to make it return what
I want. Any ideas???

Thanks,

markJ



More information about the thelist mailing list