RE: [PHP-WIN] Question on using an array - And after all that...
| From: | Asendorf, John | Date: | Thu, 01 Mar 2001 18:43:05 +0000 |
| Subject: | RE: [PHP-WIN] Question on using an array - And after all that... | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5781@lists.php.net to get a copy of this message | ||
And after all was said and done... I chickened out and did the following:
1) created a PHP page that would accept the site addresses and put them in a
"click here" link and an auto-refresh javascript...
2) add the areas to the array like so:
,'outsite.php?site=http://www.lickingcountysheriff.com'
=> 'County Sheriff'
,'outsite.php?site=http://www.msmisp.com/lpd/' => 'Park
District'
,'outsite.php?site=http://www.state.oh.us/odhs/county/licking/'
=> 'CSEA'
,'outsite.php?site=http://www.lcats.org/'
=> 'LCATS'
);
which, in turn, fixed my 'overwriting the key' problem
3) Left everything else alone...
See it in action at www.lcounty.com
Thanks everyone... I had to alert viewers that they were being transfered
out of the domain due our/my accessability standards...
---------------------
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: Asendorf, John [mailto:JAsendorf@lcounty.com]
> Sent: Thursday, March 01, 2001 8:52 AM
> To: mru@suchtreffer.de; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Question on using an array
>
>
> 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 & Litter'
> ,'ac/' => 'Animal Control'
> ,'cc/' => 'County Commissioners'
> ,'auditor/' => 'County Auditor'
> ,'ww/' => 'Water & 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
> > _______________________________________________________________
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>