title: Php singleton class :PDO Query result as array in php
body: <p>I am working small php project and i am using singleton database class from this <a href="https://gist.github.com/skhani/5aebd11015881fb3d288" rel="nofollow">repo</a></p>
  
  <p>The problem is i can't get query result as array value.Here is my code</p>
  
  <p><strong>Core.php</strong></p>
  
  <pre><code>class Core extends Database
  {
  
      public static function run($sql)
      {
          return parent::getInstance()-&gt;getConnection()-&gt;query($sql);
      }
      public function getUniversities()
      {
          $sql = 'SELECT * FROM `adm_universities`';
          return Core::run($sql);
      }
  }
  
  
   //get the data from db 
      $result=Core::getUniversities();
     print_r($result);
  </code></pre>
  
  <p>But the <code>PDOStatement Object</code> returns only the <code>queryString</code> not the result array.
  what's wrong with this code?</p>