title: How to use card-deck with dynamically generated data?
body: <p>I want to display data use card-deck. So every three data from database, it will make a new line. So, one line just have 3 datas, how to fix it?</p>
  
  <p>Here my code, it display one line with all data from database and how to fix it?</p>
  
  <pre><code>&lt;?php for($i=0; $i&lt;count($data); $i++){
      if($i % 3 == 0){?&gt;
  &lt;div class="card-deck ml-2 mr-2 mb-3"&gt;
    &lt;?php $no=1; foreach ($data as $d ){?&gt;
    &lt;div class="card border-dark"&gt;
      &lt;img class="card-img-top" src="&lt;?php echo base_url('assets/koceng.jpeg')?&gt;" alt="Card image cap"&gt;
      &lt;div class="card-body"&gt;
        &lt;h5 class="card-title"&gt;Card title&lt;/h5&gt;
        &lt;p class="card-text"&gt;&lt;?php echo $no++ ?&gt;
            &lt;?php echo $d-&gt;nim ?&gt;
            &lt;?php echo $d-&gt;nama ?&gt;
            &lt;?php echo $d-&gt;kelas ?&gt;
            &lt;?php echo $d-&gt;nama_jurusan ?&gt;
            &lt;?php echo $d-&gt;fakultas ?&gt;&lt;/p&gt;
        &lt;p class="card-text"&gt;&lt;small class="text-muted"&gt;Last updated 3 mins ago&lt;/small&gt;&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
      &lt;?php }?&gt;
  &lt;/div&gt;
      &lt;?php }}?&gt;
  </code></pre>
  
  <p>Thankyou.</p>