[eluser]Rolly1971[/eluser]
the way your doing it is not needed.
for example
Code:
public function index()
{
$number = new $this->numbersclass->numbers("5","45");
echo $number->multiply_numbers();
echo $numbers->divide_numbers();
echo $numbers->subtract_numbers();
}
is better written like:
Code:
public function index()
{
$this->numbersclass->numbers("5","45");
echo $this->numbersclass->multiply_numbers();
echo $this->numbersclass->divide_numbers();
echo $this->numbersclass->subtract_numbers();
}
because the way CI works is when it loads a class using: $this->load->library('classname') a reference object is automatically created with the same name as the class.
the way you are coding it your creating a reference to a class from a reference to a class which is a bit in-efficient.