$qry = "SELECT * FROM database.table;"; //create Query $result = $db -> query($qry); //send and get result $resultArray = $result->fetchAll(); //fetch result echo $resultArray;