View Single Post
  #10  
Old 10-17-2009, 12:53 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Sort of like,

PHP Code:
function onCreated()
{
  
temp.array.add(2);
  
temp.array.add("hi!");
  
temp.array.add("bogan");
  
  for (
t=0t<temp.array.size(); t++)
  if (
temp.array[t] == "hi!")
  {
    
thiso.pointer temp.array[t];
    
thiso.pointer.var = "woo";
    break;
  }
  echo(
this.pointer.var);

I think the index will have to have a non-null value before you can assign values to it unless you add an object instead.

[Edit]

Confirmed
PHP Code:
function onCreated()
{
  
temp.array[0] = "hi";
  
temp.array[1].var = "yes";
  echo(
temp.array[1].var);

doesn't work =(
Reply With Quote