I cant figure out why i only get 1 entry in the returning array, when the table has 4 entries in total.
My PDO code is:
$stmtkat = $this->db->prepare("SELECT * FROM kategorie");
$stmtkat->execute();
$katarray=$stmtkat->fetch(PDO::FETCH_ASSOC);
var_dump($katarray);
The return array i get:
array(2) { ["id"]=> string(1) "1" ["kategorie"]=> string(12) "Coaching" }
The table has 4 rows, why do i get only the first row into the array? What i am doing wrong? Obviously i am new to PDO.
Ty for your time.