Constructor Variable Scope Help
Posted: Fri May 14, 2010 1:35 pm
How do I use variables declared in a class constructor in the other class functions?
Code: Select all
function __construct()
{
include('../../classes/Obj.class.php');
$Obj = new Obj;
$Obj->connect();
}
function getSomething()
{
//use $Obj here
}