title: Loop until it gets to empty database field
body: <p>this code works: </p>
  
  <pre><code>$i=1;
  require('db.php');
  $query = "SELECT own".$i." FROM users WHERE username='".$_SESSION['username']."'";
  $result = mysqli_query($con, $query);
  $row = mysqli_fetch_assoc($result);
  </code></pre>
  
  <p>So i try to put it into loop but it is not working. I get only the first result.
  Is it even possible to do it that way?</p>
  
  <pre><code>while (isset($row['own'.$i])) {
  require('db.php');
  $query = "SELECT own".$i." FROM users WHERE username='".$_SESSION['username']."'";
  $result = mysqli_query($con, $query);
  $row = mysqli_fetch_assoc($result);
   echo $row['own'.$i];
   $i++;
  }
  </code></pre>
  
  <p>Also I use the above code to make first check before the loop</p>