RE: [PHP-WIN] Question on using an array

From: Date: Thu, 01 Mar 2001 13:51:33 +0000
Subject: RE: [PHP-WIN] Question on using an array
Groups: php.windows 
Request: Send a blank email to php-windows+get-5770@lists.php.net to get a copy of this message
I used Michael's suggestion and came up with something that 'almost' works... I totally forgot an important part... the links were being alphabetized. (I snipped out a bunch of stuff here... so it's easier to see the meat...) You can see the result at http://www.lcounty.com/is/website/revision.php I'm using some dummy includes and the page is inaccessible through the site... $arr_links = array('is/' => 'Information Systems' ,'hr/' => 'Human Resources' ,'planning/' => 'Planning Commission' ,'boe/' => 'Board of Elections' ,'rec/' => 'County Recorder' ,'lchd/' => 'Health Department' ,'treasurer/' => 'County Treasurer' ,'rlc/' => 'Recycling &amp; Litter' ,'ac/' => 'Animal Control' ,'cc/' => 'County Commissioners' ,'auditor/' => 'County Auditor' ,'ww/' => 'Water &amp; Wastewater' ,'mrdd/' => 'MRDD' ,'vsc/' => 'Veterans\' Commission' ,'links.php' => array ('1' => 'Park District ' ,'2' => 'CSEA' ,'3' => 'County Sheriff' ,'4' => 'LCATS' ) ); while ( list($key, $val) = each($arr_links) ) { if ( is_array( $val ) ) { while ( list($key1, $val1) = each($val) ) { echo " <tr>\n <td></td>\n<td nowrap"; $currentlink = $levels.$key; //SNIP echo "><A class=\"sidebar\" href=\"$currentlink\">$val1</A></td>\n<td></td>\n </tr>\n"; } } else { //for the other ones... } } --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aut insanit homo, aut versus facit > -----Original Message----- > From: Michael Rudel [mailto:mru@suchtreffer.de] > Sent: Thursday, March 01, 2001 7:22 AM > To: 'Asendorf, John' > Subject: RE: [PHP-WIN] Question on using an array > > > Hey John, > > ... have you solved your problem ??? > > Greetinx, > > Michael Rudel > - Web-Development, Systemadministration - > _______________________________________________________________ > > Suchtreffer AG > Bleicherstraße 20 > D-78467 Konstanz > Germany > fon: +49-(0)7531-89207-17 > fax: +49-(0)7531-89207-13 > e-mail: mailto:mru@suchtreffer.de > internet: http://www.suchtreffer.de > _______________________________________________________________ > >

« previous php.windows (#5770) next »