Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged array
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
/* ---===[ EXAMPLE ]===--- */
var TT = new AssociativeArray();
TT.add("k-1", "Value 1");
TT.add("k-2", "Value 2");
TT.add("k-3", "Value 3");
TT.add("k-4", "Value 4");
alert(TT.to_string());
1
709
posted 17 years ago by vbert
/* --==[ EXAMPLE ]==--
var colors = new AArray();
colors.add("k01", {bk:"#fff",tk:"b",it:"hello"});
var oC = colors.get("k01");
var tT = '';
for(K in oC) tT += "[" + K + "]: " + oC[K] + "\n";
tT += "\n\n";
tT += oC.bk + "\n";
tT += oC...
1
1091
posted 17 years ago by vbert
The important thing to notice is the () operator in a[2]. It is invoking the function inside a[0] with the argument a[1].
1
939
posted 17 years ago by 1man
SEE http://json.org/ for PHP JSON Libraries.
grunt knuckle drag brute force ugly escapes for quotes make a php array a json string
Produces trailing commas which some Javascript Librarys can't deal with.*
_*NOOB NOTE [a comma is added at the...
2
1193
posted 17 years ago by inkdeep
Helps identify correctly the type of whatever you put as an argument. This was adapted from http://www.planetpdf.com/developer/article.asp?ContentID=testing_for_object_types_in_ja
3
1069
posted 18 years ago by rolandog