Re: neubie seeking answers

From: Date: Thu, 31 Mar 2011 16:41:30 +0000
Subject: Re: neubie seeking answers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-312165@lists.php.net to get a copy of this message
On Thu, 2011-03-31 at 12:24 -0400, Kirk Bailey wrote: > I need to extract the name of the subdirectory a page lives in to > use in the title for that page. This will be returned as a string to > echo to the output stream. Now how the heck do I do that?!? > > -- > end > > Very Truly yours, > - Kirk Bailey, > Largo Florida > > kniht > +-----+ > | BOX | > +-----+ > think > > I am SURE that there is a better reply already... but quick and dirty... <?php $t = explode('/', dirname(__FILE__)); echo $t[count($t) - 1]; ?>

« previous php.general (#312165) next »