title: PHP - SQLite unexpected return array results
body: <p>First time playing with SQLite, I've created a database and table and set the column <code>id</code> as the <code>primary key unique</code>.</p>
  
  <p>I've inserted some data into the table and can see the data when I do :</p>
  
  <p><code>SELECT * FROM members;</code></p>
  
  <p>However when I run the following query I'm not getting the results I expected.</p>
  
  <pre><code>$result = $db-&gt;query("SELECT * FROM members WHERE plan = 'User' AND id = '$users_id'");
      echo "&lt;pre&gt;";
      print_r($result-&gt;fetchArray());
      echo "&lt;/pre&gt;";
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Array
  (
      [0] =&gt; 124578986532-784512986452
      [id] =&gt; 124578986532-784512986452
      [1] =&gt; User
      [plan] =&gt; User
      [2] =&gt; 54890
      [phone] =&gt; 54890
      [3] =&gt; 698-78450
      [staffID] =&gt; 698-78450
      [4] =&gt; WestWing
      [location] =&gt; WestWing
      [5] =&gt; 1
      [active] =&gt; 1
  )
  </code></pre>
  
  <p>Which is the correct result, but why do I get duplicates for each returned entry ?</p>
  
  <p>ie: Why <code>[0] &amp; [id]</code>, <code>[1] &amp; [plan]</code> ??</p>
  
  <p>As each users ID is unique searching for it will only ever return one result set, how do I use the results as variables I can use elsewhere within the page ?</p>
  
  <p>eg: <code>$id = $result['id']</code> ?</p>
  
  <p>Thanks </p>