I'm just beginning to work with class constructors. In the script below, I want to pass in the $arg2 value from outside the class.
How do I need to define a variable $someVariable=n, so that it can be set from outside the class constructor from the parent file which includes the file below?
class myClassTest
{
public $var1;
public $var2;
public $var3;
function __construct($arg1,$arg2=$someVariable){ //MAKE $arg2 dynamically set from outside the class
$this->var1 = $arg1;
$this->var2 = $arg2;
$this->var3 = array();
}