<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.sqlite3result.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'sqlite3result.fetcharray.php',
    1 => 'SQLite3Result::fetchArray',
    2 => 'Fetches a result row as an associative or numerically indexed array or both',
  ),
  'up' => 
  array (
    0 => 'class.sqlite3result.php',
    1 => 'SQLite3Result',
  ),
  'prev' => 
  array (
    0 => 'sqlite3result.construct.php',
    1 => 'SQLite3Result::__construct',
  ),
  'next' => 
  array (
    0 => 'sqlite3result.finalize.php',
    1 => 'SQLite3Result::finalize',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sqlite3/sqlite3result/fetcharray.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="sqlite3result.fetcharray" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SQLite3Result::fetchArray</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SQLite3Result::fetchArray</span> &mdash; <span class="dc-title">
   Fetches a result row as an associative or numerically indexed array or both
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sqlite3result.fetcharray-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><strong>SQLite3Result::fetchArray</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = <strong><code><a href="sqlite3.constants.php#constant.sqlite3-both">SQLITE3_BOTH</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Fetches a result row as an associative or numerically indexed array or both.
   By default, fetches as both.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sqlite3result.fetcharray-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       Controls how the next row will be returned to the caller. This value
       must be one of either <strong><code><a href="sqlite3.constants.php#constant.sqlite3-assoc">SQLITE3_ASSOC</a></code></strong>,
       <strong><code><a href="sqlite3.constants.php#constant.sqlite3-num">SQLITE3_NUM</a></code></strong>, or <strong><code><a href="sqlite3.constants.php#constant.sqlite3-both">SQLITE3_BOTH</a></code></strong>.
       <ul class="itemizedlist">
        <li class="listitem">
         <p class="para">
          <strong><code><a href="sqlite3.constants.php#constant.sqlite3-assoc">SQLITE3_ASSOC</a></code></strong>: returns an array indexed by column
          name as returned in the corresponding result set
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <strong><code><a href="sqlite3.constants.php#constant.sqlite3-num">SQLITE3_NUM</a></code></strong>: returns an array indexed by column
          number as returned in the corresponding result set, starting at
          column 0
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <strong><code><a href="sqlite3.constants.php#constant.sqlite3-both">SQLITE3_BOTH</a></code></strong>: returns an array indexed by both
          column name and number as returned in the corresponding result set,
          starting at column 0
         </p>
        </li>
       </ul>
      </p>
     </dd>
    
   </dl>
  </p>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-sqlite3result.fetcharray-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a result row as an associatively or numerically indexed array or
   both. Alternately will return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if there are no more rows.
  </p>
  <p class="para">
   The types of the values of the returned array are mapped from SQLite3 types
   as follows: integers are mapped to <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> if they fit into the
   range <strong><code><a href="reserved.constants.php#constant.php-int-min">PHP_INT_MIN</a></code></strong>..<strong><code><a href="reserved.constants.php#constant.php-int-max">PHP_INT_MAX</a></code></strong>, and
   to <span class="type"><a href="language.types.string.php" class="type string">string</a></span> otherwise. Floats are mapped to <span class="type"><a href="language.types.float.php" class="type float">float</a></span>,
   <code class="literal">NULL</code> values are mapped to <span class="type"><a href="language.types.null.php" class="type null">null</a></span>, and strings
   and blobs are mapped to <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
  </p>
 </div>


</div><?php manual_footer($setup); ?>