Re: Get previous folder

From: Date: Thu, 10 Jul 2003 12:25:56 +0000
Subject: Re: Get previous folder
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154718@lists.php.net to get a copy of this message
On Thursday 10 July 2003 20:03, Matt Palermo wrote: > Anyone know how I can stip off the end of a folder location, so that it > will be a folder in the next level up? I want to turn something like this: > > /path/to/folder/MyFolder/ > > into somthing like this: > > /path/to/folder/ > > I just need to strip off the last folder and that is it. Can anyone help > me out? I appreciate it. Thanks. explode(), array_pop(), implode() or strrpos(), substr() are just some of the ways this can be done. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "sic transit discus mundi" (From the System Administrator's Guide, by Lars Wirzenius) */

« previous php.general (#154718) next »