title: PHP PDO fetch returns a array?
body: <pre><code>$GetUid = $dbConnect-&gt;prepare("SELECT UID FROM users WHERE username = :username");
  $GetUid-&gt;execute($RegisterData3);
  $UserID = $GetUid-&gt;fetch();
  </code></pre>
  
  <p>why does it return array not a string ?</p>
  
  <p>var_dump('$UserID') says</p>
  
  <pre><code>array
    'UID' =&gt; string '45' (length=2)
    0 =&gt; string '45' (length=2)
  </code></pre>
  
  <p>it should be</p>
  
  <pre><code>array
    'UID' =&gt; string '45' (length=2)
  </code></pre>
  
  <p>update*
  what about the 0 ? where does it came from ? thanks for the replies.</p>