I have controller and model. i am modifying a variable value in a model, but it doesn’t reflect in controller, I am not that much expert in OOP.
// controller class structure
class Leads_import extends CI_Controller {
public $total = 0;
public function import(){
$this->xml_model->imsert();
echo $this->total;
}
}
// model class structure
class xml_model extends CI_Model {
public function insert(){
this->total = 10;
}
}
Try this:
Model: