title: How to display the content of more then one SQL database row
body: <p>I am trying to retrieve the data stored in an unknown number of mySQL database rows and display them using HTML. At the moment I can display data from one row.</p>
  
  <p>Each row has a unique id number, I was planning to iterate through by comparing this number to the variable <code>counter</code>. But it would then leave me with the issue of displaying the results in HTML. At the moment I am just echoing variables that contain data from the rows. However what I want to create is a HTML list that increases in length depending on how many rows are in the table.</p>
  
  <p>Here is my current PHP code for retrieving a row from the database is:</p>
  
  <pre><code>$sql = "SELECT * FROM project_tasks WHERE project_name='$proj_name' AND task_id='$counter'"; 
  $query = mysqli_query($db_conx, $sql);
  $row = $query-&gt;fetch_assoc();
  $task_id = $row["task_id"];
  $proj_name = $row["project_name"];
  $task_name = $row["task_name"];
  $task_importance = $row["task_importance"];
  $task_description = $row["task_description"];
  $task_deadline = $row["task_deadline"];
  $task_members = $row["task_members"];
  $task_budget = $row["task_budget"];
  </code></pre>
  
  <p>At the moment I am just displaying some of the results in HTML using this code:</p>
  
  <pre><code>&lt;div id="inner_container"&gt;
              &lt;?php echo "$task_id $proj_name $task_name $task_deadline"; ?&gt;
              &lt;/div&gt;
  </code></pre>