Welcome Guest, Not a member yet? Register   Sign In
How to use a variable in: $this->index(); ?
#4

[eluser]mddd[/eluser]
You could also user call_user_func(). Check the php manual for that.
Example:
Code:
// call index() with argument 'hello'
call_user_func('index', 'hello');

// call $this->index with argument 'hello'
call_user_func(array($this, 'index'), 'hello');

// call mymodel->index with argument 'hello'
call_user_func(array('mymodel','index'), 'hello');


Messages In This Thread
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 02:09 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 02:23 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 02:29 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 02:35 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 02:43 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 03:03 AM
How to use a variable in: $this->index(); ? - by El Forum - 04-15-2010, 03:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB