title: Display each row from MySQL in a separate DIV
body: <p>I have a posts table which contains a field for the posts. Let's say I have 10 posts that i want to show in 10 divs. How should I proceed in doing that? I've managed to get the full contents using a while loop, but that only shows the full contents in one place, and I want to have individual divs (so i can use different background colors) for each individual post.</p>
  
  <p>Help me out please, I hope it makes sense. Just think at the way facebook displays posts for example. Each post has it's own box. I want something similar.</p>
  
  <p>Snippet of the code I have to get the posts is available here: </p>
  
  <pre><code>&lt;?php
  require_once("includes/database.php"); // Get the database connection
  
  $get_post = "SELECT full_post FROM posts";
  $show_post = mysqli_query($connection, $get_post);
  
  if (!$show_post) {
  echo "Could not load post. " . "(" . mysqli_error($connection) . ")";
  }
  while ($post = mysqli_fetch_assoc($show_post)) {
  echo $post["full_post"] . "&lt;br /&gt;";
  }
  mysqli_free_result($show_post);
  
  ?&gt;
  </code></pre>