php-windows Digest 1 Mar 2001 13:22:59 -0000 Issue 468
Topics (messages 5765 through 5767):
Re: Question on using an array
5765 by: Ernest E Vogelsinger
5767 by: Asendorf, John
Problem enabling extensions
5766 by: Alan Hale
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
At 16:55 28.02.2001, Asendorf, John said:
--------------------[snip]--------------------
>I just added the last three entries on the array which all have the same key
>(could be my obvious problem...) My problem is that the while loop only hits
>the LAST of the three 'links.php' entry...
>
>Any suggestions on how to force it to hit all of those entries?
>pleasepleasepleaseplease don't tell me I have to rewrite the whole thing
>with the keys/values reversed...
--------------------[snip]--------------------
You've already got excellent answers (you only have _one_ "links.php" key
in the array). I wanted to add that you should put a "reset($array)"
statement before any "each($array)" loop to make sure the loop will
reliably start at the very first element.
...ebird
>O Ernest E. Vogelsinger
(\) http://www.1-at-web.at/
^ ICQ# 13394035
I don't think that it would. But I'm not really certain on that. I would
think that (for as little as our sidebar links change (and need to change
for that matter)) it would be more server-intensive to hit a database than
to hit an array saved in the include...
Anyone know otherwise?
I created this script long before this came up and hadn't considered the
ramifications of having two sidebar links connecting to the same page...
Rewriting it's going to be a pain...
---------------------
John Asendorf - [EMAIL PROTECTED]
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: Ignatius Teo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 5:49 PM
> To: 'Asendorf, John'; 'Php-Windows (E-mail)'
> Subject: RE: [PHP-WIN] Question on using an array
>
>
> John,
>
> OK, I won't tell you but I think you've already realised that
> you probably will have to anyway.
> :-)
>
> Wouldn't it be easier (not to mention extensible) to put this
> in a database? Or r u just testing?
>
> Ignatius
>
>
> > -----Original Message-----
> > From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 1 March 2001 02:55
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] Question on using an array
> >
> >
> > I have an array which looks something like this:
> >
> > $arr_links = array('is/' => 'Information Systems'
> > ,'hr/' => 'Human Resources'
> > ,'planning/' => 'Planning Commission'
> > ,'boe/' => 'Board of Elections'
> > ,'vsc/' => 'Veterans\' Commission'
> > ,'links.php' => 'Park District '
> > ,'links.php' => 'CSEA'
> > ,'links.php' => 'County Sheriff');
> >
> > and a directory builder that uses a while loop like this
> >
> > while ( list($key, $val) = each($arr_links) ) {
> >
> > //do a lot of stuff
> >
> > }
> >
> >
> > I just added the last three entries on the array which all
> > have the same key
> > (could be my obvious problem...) My problem is that the while
> > loop only hits
> > the LAST of the three 'links.php' entry...
> >
> > Any suggestions on how to force it to hit all of those entries?
> > pleasepleasepleaseplease don't tell me I have to rewrite the
> > whole thing
> > with the keys/values reversed...
> >
> > thanks in advance,
> >
> > John
> >
> >
> >
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Aut insanit homo, aut versus facit
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
I'm using Omnihttpd Pro personal web server running on Windows ME, and
with PHP 4 bundled with the server. When I try to enable dlls by
uncommenting lines in php.ini (e.g. ;extension=php_gd.dll) the browser
becomes unable to load pages from the server, takes a long time trying
and then gives up with a blank page showing. I've left the extension
directory at the default of "extension_dir = ./ " with the dlls directly
under the php directory. I've a copy of php.ini in both the php
directory and under windows, though its the latter thats being read.
Any suggestions please - I really want to use the gd extension but I
get the same problem if I uncomment any other extension dll lines in
php.ini)
Alan Hale