title: how to show image in cart system in CodeIgniter?
body: <p>I want to show image in cart system in codeigniter. But I failed to do that. I am new in codeigniter. So I need some help from you. </p>
  
  <h1>here is my controller:::</h1>
  
  <pre><code>class Cart extends CI_Controller {
  
  public function add_to_cart($product_id) { // adds a product to cart 
      $this-&gt;load-&gt;model('cart_model');
      $result = $this-&gt;cart_model-&gt;selectProductByProductId($product_id);
  
      $insert = array(
          'id' =&gt; $product_id,
          'qty' =&gt; 1,
          'price' =&gt; $result-&gt;product_price,
          'name' =&gt; $result-&gt;product_name,
      'image' =&gt; $result-&gt;product_image
      );
      //$this-&gt;load-&gt;library('Cart');
      $this-&gt;cart-&gt;insert($insert);
      redirect("cart/show_cart");
  }
  </code></pre>
  
  <h1>View:::</h1>
  
  <pre><code>&lt;?php echo $items['image'] ?&gt;
  </code></pre>
  
  <p>This is not working in cart view page .. Maybe I need some change with cart library but I do not know where I edit or update. Please help me out .</p>