View Single Post
  #4  
Old 09-24-2011, 12:26 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
The new[] keyword will create a completely new array. You can't expand existing arrays with it. Also, you should use the array size minus one when assigning something to the last index/field, since it starts at 0.

Not sure if it's necessary, but I always create arrays with a dynamic size like this:
PHP Code:
temp.array = {};
temp.array = new[]; // I believe this is also possible 
You're also missing some this. prefixes in your code (that, or you got one where you don't want one).
Reply With Quote