consider this code :
Class Controller_xyz extends Controller
{
protected $res=' ';
public function action_reg()
{
$this->res="blah";
$x="blah"
echo $this->res;
echo $x;
}
}
output :
b
blah
why am I not able to change class variable?
You made a typo @
$x="blah"(missing;)Working code: http://ideone.com/jmICU
(Controller stripped out)
Please let me know if my answer has worked.