Welcome Guest, Not a member yet? Register   Sign In
Multiple method calls from library
#1

Hi there,

I would like to know how can I call two methods from library in a loop? For example I have library called "Test" and I load it in my controller
PHP Code:
$this->load->library('test'); 

I have array with values, for example:
PHP Code:
$values = array(1020304050); 

Now I have to loop through that array and call two methods from my library:
PHP Code:
foreach($values as $value) {
    
$this->test->set($value);
    
$returned_value $this->test->get();
    echo 
$returned_value.'<br>';


My problem is that after the first call of these methods I can see returned value but after that I'm not getting any remaining values. How can I achieve that in CodeIgniter?
Reply


Messages In This Thread
Multiple method calls from library - by ManOfHonor - 11-04-2016, 02:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB