Arrays: new and old keys, i

Mark Wieder mwieder at ahsoftware.net
Fri Sep 12 12:37:48 EDT 2008


Trevor-

Thursday, September 11, 2008, 2:20:36 PM, you wrote:


> I'm thinking of how PHP behaves. Arrays in PHP know the order that  
> elements were added so that when you use foreach you get the elements
> in that same order. I always found this very useful when working with
> arrays in PHP.

AFAIK the order of array keys in "for each" in rev is undefined, so an
engine change that determined the order wouldn't break any existing
code.

But I'm sorry to say that I can't think of a situation in which
chronological order would be helpful. Obviously you've got a scenario
where this works - could you enlighten me?

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list