Quote:
Originally Posted by Switch
PHP Code:
function onCreated() {
temp.array = { 1,2,3 };
if (array[0] == 1)
echo("first param at [0]");
if (array[1] == 2)
echo("second param at [1]");
if (array[2] == 3)
echo("third param at [2]");
}
|
There's a way better way of doing this... by looping:
PHP Code:
temp.array = {1,2,3};
for (temp.params : array) {
// blabla
}