title: Differences in mysqli_fetch functions
body: <p><a href="https://stackoverflow.com/a/962422/1397061">This post</a> gives four ways of retrieving the result of a MySQL query: </p>
  
  <ul>
  <li><p><a href="http://docs.php.net/mysqli_fetch_array" rel="nofollow noreferrer"><code>mysqli_fetch_array</code></a> — Fetch a result row as an associative, a numeric array, or both</p>
  
  <pre><code>$row = mysqli_fetch_array($result);
  echo $row[0]; // or
  echo $row['online'];
  </code></pre></li>
  <li><p><a href="http://docs.php.net/mysqli_fetch_assoc" rel="nofollow noreferrer"><code>mysqli_fetch_assoc</code></a> — Fetch a result row as an associative array</p>
  
  <pre><code>$row = mysqli_fetch_assoc($result);
  echo $row['online'];
  </code></pre></li>
  <li><p><a href="http://docs.php.net/mysqli_fetch_object" rel="nofollow noreferrer"><code>mysqli_fetch_object</code></a> — Returns the current row of a result set as an object</p>
  
  <pre><code>$row = mysqli_fetch_object($result);
  echo $row-&gt;online;
  </code></pre></li>
  <li><p><a href="http://docs.php.net/mysqli_fetch_row" rel="nofollow noreferrer"><code>mysqli_fetch_row</code></a> — Get a result row as an enumerated array</p>
  
  <pre><code>$row = mysqli_fetch_row($result);
  echo $row[0];
  </code></pre></li>
  </ul>
  
  <p>Is there any significant difference between these four functions, in terms of either performance or functionality, or can they be used interchangeably?</p>