Re: [PHP] Recursive Directory Listing

2008-11-05 Thread Ashley Sheridan
On Wed, 2008-11-05 at 09:11 -0500, Joe Schaeffer wrote: > >> I would say to do that with CSS, not building it into the output. > > That's actually how I've got things set up now -- I just rarely trust > the house-of-cards that is nested lists in CSS (and I've gone and > complicated things with fir

Re: [PHP] Recursive Directory Listing

2008-11-05 Thread Joe Schaeffer
>> I would say to do that with CSS, not building it into the output. That's actually how I've got things set up now -- I just rarely trust the house-of-cards that is nested lists in CSS (and I've gone and complicated things with first-child selectors all over the place)! Thanks, all, for the grea

Re: [PHP] Recursive Directory Listing

2008-11-04 Thread Ashley Sheridan
On Tue, 2008-11-04 at 07:51 -0800, Jim Lucas wrote: > Joe Schaeffer wrote: > >> Joe, > >> > >> Here is a simplified recursive version of your above statement. > >> > >> >> $dir = '.'; > >> function displayDir($dir='.') { > >>$show = FALSE; > >>$results = glob($dir.'/*'); > >>

Re: [PHP] Recursive Directory Listing

2008-11-04 Thread Ashley Sheridan
On Tue, 2008-11-04 at 09:56 -0500, Joe Schaeffer wrote: > > Joe, > > > > Here is a simplified recursive version of your above statement. > > > > > $dir = '.'; > > function displayDir($dir='.') { > >$show = FALSE; > >$results = glob($dir.'/*'); > >foreach ( $results AS $entr

RE: [PHP] Recursive Directory Listing

2008-11-04 Thread Boyd, Todd M.
> -Original Message- > From: Joe Schaeffer [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2008 8:56 AM > To: Jim Lucas > Cc: php-general@lists.php.net > Subject: Re: [PHP] Recursive Directory Listing > > > > $dir = '.'; > > fu

Re: [PHP] Recursive Directory Listing

2008-11-04 Thread Jim Lucas
Joe Schaeffer wrote: >> Joe, >> >> Here is a simplified recursive version of your above statement. >> >> > $dir = '.'; >> function displayDir($dir='.') { >>$show = FALSE; >>$results = glob($dir.'/*'); >>foreach ( $results AS $entry ) { >>if ( is_dir($entry) &

Re: [PHP] Recursive Directory Listing

2008-11-04 Thread Aschwin Wesselius
Joe Schaeffer wrote: Joe, Here is a simplified recursive version of your above statement. '; foreach ( $dirs AS $entry ) { echo '', basename($entry); displayDir($entry); echo ''; }

Re: [PHP] Recursive Directory Listing

2008-11-04 Thread Joe Schaeffer
> Joe, > > Here is a simplified recursive version of your above statement. > > $dir = '.'; > function displayDir($dir='.') { >$show = FALSE; >$results = glob($dir.'/*'); >foreach ( $results AS $entry ) { >if ( is_dir($entry) && !in_array($entry, array('.', '

Re: [PHP] Recursive Directory Listing

2008-11-01 Thread tedd
At 12:13 PM -0400 10/30/08, Joe Schaeffer wrote: I have a (readable) directory structure like so: ../navigation /cats /dogs /beagles /collies /some/other/dirs/ /horses I need to display those directories in nested html lists (marked up with css). Using PH

Re: [PHP] Recursive Directory Listing

2008-10-31 Thread Jim Lucas
Joe Schaeffer wrote: > Thanks, all, for pointing me to the SPL iterators. i've been hunting > around and i've managed to come up with a working script. I know it > could be better, though. I know this is terribly inefficient -- a lot > of manual repetition and no recursion. Here's what I've got, >

Re: [PHP] Recursive Directory Listing

2008-10-31 Thread Joe Schaeffer
Thanks, all, for pointing me to the SPL iterators. i've been hunting around and i've managed to come up with a working script. I know it could be better, though. I know this is terribly inefficient -- a lot of manual repetition and no recursion. Here's what I've got, commenting my concerns: '; fore

Re: [PHP] Recursive Directory Listing

2008-10-30 Thread Jochem Maas
Joe Schaeffer schreef: > Well, that makes things much easier (and that should teach me to rely > on a 5-year-old O'Reilly book...)! Thanks for the help! > > I'm able to display all the contents of the correct dirs and subdirs, > but I'm struggling with my implementation. Since I'm trying to nest >

Re: [PHP] Recursive Directory Listing

2008-10-30 Thread Ashley Sheridan
On Thu, 2008-10-30 at 15:28 -0400, Joe Schaeffer wrote: > Well, that makes things much easier (and that should teach me to rely > on a 5-year-old O'Reilly book...)! Thanks for the help! > > I'm able to display all the contents of the correct dirs and subdirs, > but I'm struggling with my implement

Re: [PHP] Recursive Directory Listing

2008-10-30 Thread Eric Butera
On Thu, Oct 30, 2008 at 3:28 PM, Joe Schaeffer <[EMAIL PROTECTED]> wrote: > Well, that makes things much easier (and that should teach me to rely > on a 5-year-old O'Reilly book...)! Thanks for the help! > > I'm able to display all the contents of the correct dirs and subdirs, > but I'm struggling

Re: [PHP] Recursive Directory Listing

2008-10-30 Thread Joe Schaeffer
Well, that makes things much easier (and that should teach me to rely on a 5-year-old O'Reilly book...)! Thanks for the help! I'm able to display all the contents of the correct dirs and subdirs, but I'm struggling with my implementation. Since I'm trying to nest unordered lists, I can't seem to '

Re: [PHP] Recursive Directory Listing

2008-10-30 Thread Jochem Maas
Joe Schaeffer schreef: > New to PHP development, new to the list; searched the archives but > didn't find an answer (or at least nothing i could successfully > adapt). > > I have a (readable) directory structure like so: > > ../navigation > /cats > /dogs > /beagles > /coll

[PHP] Recursive Directory Listing

2008-10-30 Thread Joe Schaeffer
New to PHP development, new to the list; searched the archives but didn't find an answer (or at least nothing i could successfully adapt). I have a (readable) directory structure like so: ../navigation /cats /dogs /beagles /collies /some/other/dirs/ /horses