Re: hrm.....array question

From: Date: Fri, 06 Oct 2000 04:38:37 +0000
Subject: Re: hrm.....array question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18830@lists.php.net to get a copy of this message
I happen to have this code laying around: $LS = ls /path/to/dir/*; $links = explode("\n",$LS); for($i = 0 ; $i < sizeof($links) ; ++$i){ $foo = explode('/',$links[$i]); $page = $foo[5]; echo '<li><a href="/admin/'.$page.'">'.$page.'</a>'; } hope that helps --Joe On Thu, Oct 05, 2000 at 10:57:14PM -0400, Kurth Bemis wrote: > wondering - how would i go about having a script do a ls listing of a > dir...then return all the entries as links.....then when you click on the > link you are taken to that dir...then the process is repeated.....but > instead of links...the files are displayed...like a photo album..... > > ~kurth > > Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer > > kurth@usaexpress.net > http://www.usaexpress.net/kurth > ICQ - 6624050 > Call Sign - N1TYW > PGP key available - http://www.usaexpress.net/kurth/pgp > > Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net > (http://www.distributed.net) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /*****************************\ * Joe Stump * * www.Care2.com * * Office: 650.328.0198 * * Extension: 122 * \*****************************/ http://www.miester.org/Joe/Stump/Joe_Stump_resume.html -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$ N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@ 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)! ------END GEEK CODE BLOCK------

« previous php.general (#18830) next »