title: Fatal error: Call to undefined method mysqli_stmt::fetch_array()
body: <p>in this code i get the error: Fatal error: Call to undefined method mysqli_stmt::fetch_array()</p>
  
  <p>What is the problem?</p>
  
  <pre><code>$search= "player";
  
  ($sql = $db-&gt;prepare('select job from jobs where job like ?'));
  
  $sql-&gt;bind_param('s', $search);
  $sql-&gt;execute();
  $sql-&gt;bind_result($search);
  
  $data = array();
  
  while ($sql-&gt;fetch_array(MYSQLI_ASSOC)) {
      $data[] = array(
              'label' =&gt; $row['job']  
      );
      echo json_encode($data);
  
  }
  
  $sql -&gt; close();
  $db -&gt; close();
  </code></pre>
  
  <p>thanks</p>