View Single Post
  #7  
Old 08-22-2009, 08:30 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Quote:
Originally Posted by Switch View Post
PHP Code:
function onCreated() {
  
temp.array = { 1,2,};
  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

Reply With Quote