An array is pretty much just a string with comma's in it, so as long as you aren't doing crazy stuff this should get you by.
PHP Code:
function onCreated() {
echo(onTestFunc({"asdf", "jkl;"})); // output = rawr
echo(onTestFunc({"rawr", "asdf"})); // output = !
}
function onTestFunc(arr) {
temp.stuff = {
{"asdf", "jklm"}, 123,
{"asdf", "jkl."}, 124,
{"asdf", "jkl;"}, "rawr"
};
arr = arr.substring(0);
for (temp.i = 0; temp.i < stuff.size(); temp.i += 2) {
if (stuff[i].substring(0) == arr) return stuff[i+1];
}
return "!";
}
If the stuff array was properly sorted you could probably write a binary search instead of that simple for loop.