Basic array stuff... Why [0] & ['key'] and [1] & ['value'] 'duplication'?

From: Glutinous (glutinosity_at_$yahoo$.co.uk)
Date: 10/31/03


Date: Thu, 30 Oct 2003 23:14:28 +0000

I've been studying this for hours, searching the www & usenet, and
still can't figure out why 'each' returns an array of four key/value
pairs, when it looks like just two pairs would suffice...

That is, it looks to me like
[0] & ['key']
are the same, and also
[1] & ['value'],
so what's the point of duplicating them?

I'm assuming that in fact there are serious differences between
[0] and ['key']
and between
[1] and [value],
but I haven't a clue what that might be.

Any hints, URLs, explanaitons, etc. most welcome!

Thank you.



Relevant Pages

  • Re: People Online
    ... Today almost everybody in the world has access to the internet. ... People online use the internet for many needs such as searching for ... "Usenet Filters - Learn to shut yourself the fuck up!" ... "Those who record history are those who control history." ...
    (alt.2600)
  • Re: ITV and its future
    ... Your usenet name is easily searchable, that links to other things you've ... The username on those other services then is searchable to other ... picture if I spent more time searching but if this is the sort of thing that ... effectively 2 mins of sitting here googling and gophering (yes, ...
    (uk.tech.broadcast)
  • RE: How to manage around 1000 entries which will constantly bechanging
    ... For each combination produced by script, ... of this array is <100, then a "new" result is automatically added. ... searching a sorted array. ... =head1 SYNOPSIS ...
    (perl.beginners)
  • Re: $_GET strings seperation
    ... // Let's do one new cID, new GET key/value ... return $arr; ... $array = Array( ...
    (php.general)
  • Re: ASCAN problems?
    ... searching in a specific column only, you want the number of *rows*. ... Running VFP 9.0 and I'm trying to use ASCANto search an array. ... When I run my form I get an error stating that the subscript is ... The help file also says that you can omit the starting element and the ...
    (microsoft.public.fox.programmer.exchange)