Re: splitting array values into usable chunks..
| From: | phplists at woodenpickle dot com | Date: | Wed, 10 Apr 2002 00:05:30 +0000 |
| Subject: | Re: splitting array values into usable chunks.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92317@lists.php.net to get a copy of this message | ||
Nevermind.. I wasn't being very smart.. I got it..
Thanks,
Bob
<phplists@woodenpickle.com> wrote in message
news:20020409234524.39669.qmail@pb1.pair.com...
> I have got this almost all the way where I need it.. Partly from the
php.net
> function list and partly from searching the archives here.. Now I'm at a
> point where I don't quite know how to finish it.. Any help would be
greatly
> appreciated.
>
> I use functions to gather the subdirectory names in the cwd using getCwd()
> and put them into an array. They are in the form of
> /home/httpd/html/phptemp/dirname and I am able to use the following to
print
> them to the page:
>
> for( $x = 0; $x < sizeof( $resultArray ); $x++ ) {
> echo( "<a
> href=\"$resultArray[$x]\">$resultArray[$x]</a><br>\n" );
> }
>
> What I would like to figure out is how to split or explode the values in
the
> array with the "/" char just before the echo so I end up with separate
vars
> for home, httpd, html, phptemp, dirname. So I could then just print out
the
> value of dirname as the link (see above).
>
> I've been trying to learn this PHP stuff for a couple weeks now and it's
> coming along nicely.. And I appreciate all the help I've found in the
posts
> to the group here.. Thanks in advance for any help..
>
> Later,
> Bob
>
> --
> Bob Weaver, Manager
> Custom PC & Web Design, LC
> http://www.custompcweb.com
> 801-400-1320
>
>