Click to See Complete Forum and Search --> : object oriented php array


knavely
11-29-2003, 01:07 AM
ok heres what im trying to do:

class X {

var $want_array;

function foo()
{
foreach( $ExistingArray as $current )
{
this->$want_array[$current] = some value...
}
}

for some reason it just wont become an array...not sure what to do
any help would be awsome!

knavely
11-29-2003, 01:28 AM
ok i think i figured it out
should be
$this->x;
not $this->$x;

right?

theN
11-29-2003, 02:41 AM
$this->x, :) right.

regards
akr