Welcome Guest, Not a member yet? Register   Sign In
private variable append not persistent

hi everybody,
I don't find the way to modify a private variable value and retrieve it in another method;
My issue :
class .. extend CI_C...
private $var;

function ..() {
//here I load $var
$this->var[] = 'ok';

function modify()
//here I append $var
$this->var[] = 'more';

function another()   //with AJAX call
//if I check $var value, the value 'more' is not set, only 'ok';
So is there a way to append $var outside from the constructor and have it updated in the whole class ?
thanks for your help

Theme © iAndrew 2016 - Forum software by © MyBB