title: Mysqli fetch array nth row
body: <p>I have the following code that fetches a single row:</p>
  
  <pre><code>$query = "SELECT *
            FROM translations
            WHERE iddoc = '$id'
            AND submitted = 1;";
  $result = mysqli_query($query);
  $row = mysqli_fetch_array($result);
  </code></pre>
  
  <p>I know this is useful in a while loop, where you can just loop through the results.</p>
  
  <p>But I need to be able to grab specific rows that meet this condition.  Something following this pseudo code:</p>
  
  <pre><code>$query = "SELECT *
            FROM translations
            WHERE iddoc = '$id'
            AND submitted = 1;";
  $result = mysqli_query($query);
  $arrayofrows = mysqli_fetch_arrayofrows($result);
  $arrayofrows[0] //(to get the first row)
  $arrayofrows[1] //(2nd row)
  </code></pre>
  
  <p>and so on...</p>
  
  <p>How can I do this?</p>