Welcome Guest, Not a member yet? Register   Sign In
How to send the values of variable from controllers to models ?
#6

[eluser]Dirk Einecke[/eluser]
Hi,

in your controller:

Code:
$vars = array('var1' => $var1, 'var2' => $var2);

$this->load->model('foobar_model');
$this->foobar_model->afunction($vars);

in your model:

Code:
function afunction($vars) {
  // do something with $vars['var1'], $vars['var2']
}

Dirk


Messages In This Thread
How to send the values of variable from controllers to models ? - by El Forum - 02-15-2010, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB