guys how to pass a property as an argument/parameter to a method in same class. Coz i think this is not valid: Code: class A{ public $var=4; function xyz($this->var){ // invalid way. } } so is there a way that i can actually pass property to a method ???
Well if you want to use a class property in a method use something like this: PHP: class A{public $var = 4;public function xyz(){$this->var //here you use your variable}}