--TEST-- PDO Common: PDO::FETCH_ASSOC --EXTENSIONS-- pdo --SKIPIF-- --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); $db->exec("INSERT INTO test VALUES(1, 'A')"); $db->exec("INSERT INTO test VALUES(2, 'B')"); $db->exec("INSERT INTO test VALUES(3, 'C')"); $stmt = $db->prepare('SELECT * from test'); $stmt->execute(); var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); ?> --EXPECT-- array(3) { [0]=> array(2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> array(2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> array(2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } }