Re: How to test that an array is 'indexed' vs 'associative'



On Sat, 31 May 2008 07:01:07 -0700 (PDT), jpedrobarbosa@xxxxxxxxx wrote:

my opinion is dont check it. just retreve the values with
"array_values"

I wish it was that easy but associative arrays are like 'hash tables' so the
values will not be in the proper order.

Daniel Klein
Cuyahoga Falls, OH
.



Relevant Pages

  • Re: How to test that an array is indexed vs associative
    ... Daniel Klein wrote: ... I wish it was that easy but associative arrays are like 'hash tables' so the ... values will not be in the proper order. ... It's one of the reasons associative arrays were created. ...
    (comp.lang.php)
  • Re: How to test that an array is indexed vs associative
    ... I wish it was that easy but associative arrays are like 'hash tables' so the ... values will not be in the proper order. ... Even "numeric" arrays are just a hash table. ... array sorting functions. ...
    (comp.lang.php)
  • Re: JavaScript associative arrays not ordered?
    ... have associative arrays, or hashes, the elements in the ... hash are alphabetically sorted if the key happens to ... order rather than in alphabetical order. ...
    (comp.lang.javascript)
  • Re: JavaScript associative arrays not ordered?
    ... hash are alphabetically sorted if the key happens to ... files around the disk every time you create or rename a file. ... In all languages I know, associative arrays ... And there's no point in sorting object ...
    (comp.lang.javascript)
  • Accessing tcl associative arrays from C.
    ... I have variable in Tcl script that contains ... names of all associative arrays that I need in C. So What I'm doing: ... Im runnig foreach loop and get name of each array, ... Hash Table or whatever. ...
    (comp.lang.tcl)