bootstrap display data from mysql in table
<p>I am trying to display my mysql rows to html bootstrap table. Database connection is working, displaying data is working, but it is not fancy as i want. I'd like to maybe save in arrayData maybe and then print this arrayData in html tag. Please any suggestions much appreciated. I want to do this easiest way and most convenient for editing later on. php code to display data :</p>

<pre><code>    if ($result-&gt;num_rows &gt; 0) {
    // output data of each row
    while($row = $result-&gt;fetch_assoc()) {
        echo "id: " . $row["id"]. " - Name: " . $row["name"]. " " . $row["lastName"]. "&lt;br&gt;"; /* and so on..*/
    }
} else {
    echo "0 results";
}
</code></pre>

<p>and this is my html code for bootstrap</p>

<pre><code>    &lt;table class="table table-striped"&gt;                     
&lt;div class="table responsive"&gt;

  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;#&lt;/th&gt;
      &lt;th&gt;Name&lt;/th&gt;
      &lt;th&gt;Last Name&lt;/th&gt;
      &lt;th&gt;Number&lt;/th&gt;
       &lt;th&gt;Info&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;th scope="row"&gt;1&lt;/th&gt;
      &lt;td&gt;ales&lt;/td&gt;
      &lt;td&gt;king&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;th scope="row"&gt;2&lt;/th&gt;
      &lt;td&gt;love&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;code&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;

  &lt;/tbody&gt;
        &lt;/div&gt;
   &lt;/table&gt;
</code></pre>

<p>EDIT: i want this, but loaded from database not manually typed :)!</p>

<p><a href="https://i.stack.imgur.com/hKTho.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hKTho.png" alt="enter image description here"></a></p>