title: Displaying rows inside a div
body: <p>I had asked this question but didn't clarify what I wanted. I want the rows from table be displayed inside the div. I just want to break each row inside the div so while the div is the main container with background then the rows should align vertical, without creating another border. just the whole thing inside the div.</p>
  
  <pre><code>       .message{
          border:2px solid;
          background-color:white;
          float:left;
          }
  </code></pre>
  
  <p>php</p>
  
  <pre><code> $user = $_SESSION['username'];
   $mydb = new mysqli('localhost', 'root', '', '');
   $stmt = $mydb-&gt;prepare("SELECT * FROM messages where from_user = ?  ");
   $stmt-&gt;bind_param('s', $user);
   $stmt-&gt;execute();
  
  
  $result = $stmt-&gt;get_result();
  while ($row = $result-&gt;fetch_assoc()) {
  
  echo"&lt;div class='message'&gt;";
  
  
  echo $row['to_user']."&lt;br/&gt;";
  
  echo"&lt;/div&gt;";
  
  }
  </code></pre>