Hi
Get look at the following code sample:
class MyClass{
var $listing = array('item1' => 'val1', 'item2' => 'val2');
var foo = array('key1' => 'zzz', 'listing' => $listing);
}
the above code generates error due to $listing in the line 3. Till now I have no option other than literally writing the array of $listing in line 2 to be as the following:
class MyClass{
var $listing = array('item1' => 'val1', 'item2' => 'val2');
var foo = array('key1' => 'zzz', 'listing' => array('item1' => 'val1', 'item2' => 'val2'));
}
My question is: Is there any other mean to define the class's variable outside of any method with other variable?!