in controller i send the object to view like:
public function comapre_array()
{
$data['pro1']="result from model"; //product details
$data['pro2']="result from model"; //product details
$data['pro3']="result from model"; //product details
$this->load->view('user/product_comp',$data);
}
and in my view i need to display that in table to comparison,
i need to take the three array value in single loop using foreach,is it is possible,
i tried like this
foreach($pro1 as $m,$pro2 as $n,$pro3 as $o){
//printing values
}
but it shows error,
please suggest me is there is any other ideas to implement this,
$data. Just loop over it, all the values are there. And no, you can't do what you suggested.