469,898 Members | 1,805 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Array Associatif

Comment connaitre les Clés d'un array associatif

tb["un"]="un tout seul";
tb["deux"]="un + un";

comment récupérer le couple (key value) comme dans PHP

Merci
G.Roydor

Jul 20 '05 #1
1 1112
Ivo
"G Roydor" <gu********@nospamlaposte.net> wrote in message
news:40**************@nospamlaposte.net...
Comment connaitre les Clés d'un array associatif

tb["un"]="un tout seul";
tb["deux"]="un + un";

comment récupérer le couple (key value) comme dans PHP


//warning: only do it this way if you know tb isn't very long!!

for (i in tb) alert( i + ' ' + tb[i]);

otherwise:

for (i in tb) if( !confirm( i + ' ' + tb[i]) ) break;

HTH
Ivo
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Brian | last post: by
2 posts views Thread by Stormkid | last post: by
8 posts views Thread by vcardillo | last post: by
12 posts views Thread by Sam Collett | last post: by
8 posts views Thread by Mike S. Nowostawsky | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.