title: returning array from class method
body: <p>Currently I am having a few issues returning an array from a class' method. here is my little test:</p>
  
  <p>Here is my method:</p>
  
  <pre><code>private function getUser($uid,$set,$params){
          switch($set){
              case 'dvar':
                  $col = $params[0];
                  $needle = $params[1];
  
                  $res = $this-&gt;dbh-&gt;prepare("SELECT col,val FROM acl_users_dvars WHERE uid=:uid");
                  $res-&gt;bindParam(':uid', $uid);
                  $res-&gt;execute();
                  foreach($res-&gt;fetchAll(PDO::FETCH_ASSOC) as $k=&gt;$v){
                      $rows[$k]=$v;
                  }
                  return($rows);
              break;
          }
  
      }
  </code></pre>
  
  <p>now, <code>vardump</code>ing directly above <code>return $rows;</code> results in:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [col] =&gt; thisiscol!
              [val] =&gt; this...is.my.VARRRRRRRRRRRRRRRRR
          )
  
      [1] =&gt; Array
          (
              [col] =&gt; thisiscol2!
              [val] =&gt; this is my bar
          )
  
  )
  </code></pre>
  
  <p>However, on the page I initialize the class and call the method:</p>
  
  <pre><code>$user = array(
      '5',
      'dvar',
      array('thisiscol!')
  );
  $tOb = $test-&gt;getResponce('get_user',$user);
  var_dump($tOb);
  </code></pre>
  
  <p>I am simply returned with:</p>
  
  <pre><code>NULL
  </code></pre>
  
  <p><strong>edit</strong></p>
  
  <p>as stated from the last answer, and i am sorry I completely left this out: Here is a partial from my getResponce method:</p>
  
  <pre><code>public function getResponce($do_what, $parameters){
          switch(strtolower($do_what)){
                  case 'create_user':
                      self::createUser($parameters[0],$parameters[1]);
                  break;
                  case 'remove_user':
                      self::remUser($parameters[0]);
                  break;
                  case 'set_user':
                      self::setUser($parameters[0],$parameters[1],$parameters[2]);
                  break;
                  case 'get_user':
                      self::getUser($parameters[0],$parameters[1],$parameters[2]);
                  break;
  </code></pre>