title: Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in on line 21
body: <p>So I'm trying to limit the rows returned and the code works fine if i use the following SELECT * FROM table LIMIT 0, 10 </p>
  
  <p>But once i change to SELECT * FROM survey LIMIT $startrow, 10 i get the following error,Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given on line 21, any ideas why I've tried to see what the issue and have tried multiple methods and still can't fix the issue.</p>
  
  <pre><code>&lt;?php
  
      global $startrow;
      $con = mysqli_connect("localhost","root","","test") or die ("could not connect to mysql");
  
      $result = mysqli_query($con, "SELECT * FROM survey LIMIT $startrow, 10");
  
      echo "&lt;table border='1'&gt;
      &lt;tr&gt;
      &lt;th&gt;Opinion&lt;/th&gt;
      &lt;th&gt;Date&lt;/th&gt;
      &lt;/tr&gt;";
  
      while($row = mysqli_fetch_array($con, $result))
      {
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . $row['Opinion'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['date'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
      }
      if (!isset($_GET['startrow']) or !is_numeric($_GET['startrow'])) {
        $startrow = 0;
      } else {
        $startrow = (int)$_GET['startrow'];
      }
  
      mysqli_close($con);
  
      ?&gt;
  </code></pre>