Try maybe:
PHP Code:
temp.array = {{"Frankie","TSAdmin"},{2000,1500}};
temp.ind = temp.array[0].index("Frankie");
echo(temp.ind);
echo(temp.array[1][temp.ind]);
The way you're doing it will not work; you can loop through the elements to find the right index, like so:
PHP Code:
temp.array = {{"Frankie",2000},{"TSAdmin",1500}};
temp.l = temp.array.size();
for (temp.i=0;temp.i<temp.l;temp.i++)
if (temp.array[temp.i][0] == "Frankie") {
echo(temp.i);
break;
}
echo(temp.array[temp.i][1]);
By my best estimates (read: guess), the former is ~2.5x faster.