Assuming the following class
class test {
public $x = 2;
public testFunction() {
//...
}
}
Is there any way I can access $x from within testFunction()?
Thanks! :)
$x is a property of test, but is an instance of another class this is still perfectly valid. Perhaps consider posting another question with a paste of your new code and the error message you receive.