Now i am coming in a circumstance like, i need to pass a parameter for array in a function(So that i can override it in the function based on my needs). So how is that possible in PHP. For eg.,
class classname
{
function __construct()
{
$array['default'] = 'default value';
}
function test()
{
$array['a'] = 'a';
$array['b'] = 'b';
}
}
I need to get the $array['default']
in the function test. So how to do that in PHP? Any help on this would be greatly appreciated.