View Single Post
  #17  
Old 01-07-2006, 01:03 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Stefan
There is also the possibility to use makevar() which doesn't accept array brackets though, nothing really dynamic except the name of the variable.
so I could run through a for loop and use makevar()? I'll try that. Hmmm... actually, this creates a challenge... scattered arrays on top of multidimensional.

Yea, I'll test this, don't know if temp. is local to the block of code only though.

PHP Code:
function evaluate(arr) {
  
temp.myBools = new[arr.size()];
  for (
i:arr)
    if (
arr[i].size 1)
      
temp.myBools[i] = evaluate(arr[i]);
    else 
      
temp.myBools[i] = makevar(arr[i]);
  return 
temp.myBools;

or wait, i don't think I understand this at all anymore.

Last edited by jake13jake; 01-07-2006 at 01:22 AM..
Reply With Quote