title: Display dynamic table data in 3 columns
body: <p>I want to display mysql table data in 3 columns.I have tried this code. But it doesn't help me. I used var_dump and recieve this output.</p>
  
  <pre><code>array(1) { [0]=&gt; string(5) "Gucci" } 
  array(1) { [0]=&gt; string(16) "Business Insider" } 
  array(1) { [0]=&gt; string(10) "Health.com" }
  array(1) { [0]=&gt; string(5) "Prada" } 
  array(1) { [0]=&gt; string(6) "Orbitz" } 
  array(1) { [0]=&gt; string(4) "Time" }
  array(1) { [0]=&gt; string(9) "dotTravel" } 
  array(1) { [0]=&gt; string(7) "Expedia" } 
  </code></pre>
  
  <blockquote>
    <p>Notice: Undefined offset: 8 in C:\xampp\htdocs\Store_Brand\catscheck.php on line 75
        NULL</p>
  </blockquote>
  
  <p>I also used echo and recieved this output:</p>
  
  <pre><code>Notice: Array to string conversion in C:\xampp\htdocs\Store_Brand\catscheck.php on line 75
  </code></pre>
  
  <p><strong>MYSQL</strong></p>
  
  <pre><code>&lt;?php
  $result = mysqli_query($con,"SELECT sm_brand_name FROM store_manufacture");
  $data = Array();
  while ($row = mysqli_fetch_row($result))
      $data[] = $row;
  
  for ($i = 0; $i &lt; count($data) / 3; $i++){ // Line 75
      echo '&lt;table&gt;&lt;tr&gt;';
      for ($j = 0; $j &lt; 3; $j++){
          echo  '&lt;td&gt;' . var_dump ($data[ $i + $j * 3])  . '&lt;/td&gt;';
      }
      echo '&lt;/tr&gt;&lt;tr&gt;';
  }
  echo '&lt;/tr&gt;&lt;/table&gt;';
  ?&gt;
  </code></pre>