for eg: class A { function one($pp) { } function two() { echo $pp; //Iwant to make $pp display here, but not working } }
class A { function one($pp) { } function two() { echo $pp; //Iwant to make $pp display here, but not working } }
I know it's a year old question, but I'm bored... try class A { private $_pp; function one($pp) { $this->_pp = $pp; } function two() { echo $this->_pp; } }
class A { private $_pp; function one($pp) { $this->_pp = $pp; } function two() { echo $this->_pp; } }