title: error when passing id in bootstrap modal
body: <p>i am new in codeigniter</p>
  
  <pre><code>&lt;?php foreach ($rows as $row) { ?&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $i++;?&gt;&lt;/td&gt; 
      &lt;td&gt;&lt;?php echo $row-&gt;orderid;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row-&gt;order_date;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row-&gt;name;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row-&gt;price;?&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal-&lt;?= $row-&gt;customerid?&gt;"&gt;View Details&lt;/button&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;div class="modal fade" id="myModal-&lt;?= $row-&gt;customerid?&gt;" role="dialog"&gt;
      &lt;div class="modal-dialog modal-sm"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
            &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
            &lt;h4 class="modal-title"&gt;Order Details&lt;/h4&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
            &lt;p&gt;&lt;strong&gt;Product Name&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo $row-&gt;name;?&gt;&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Quantity&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo $row-&gt;quantity;?&gt;&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Price&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo $row-&gt;price;?&gt;&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
            &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>only details of the first row is displayed in all modals 
  i need to get the details of each from each modal</p>