I'm doing var_dump since I started to learn PHP/PDO when I want to display the SQL datas, like:
$tickets = $db->query('SELECT * FROM tickets')->fetchAll();
var_dump($tickets);
And it shows everything.
But now I'd like to echo
a list of all tickets name, usually I would do an echo $tickets->name;
but first it doesn't work with fetchAll(); and when I use fetch(); it returns only the last row
Noob question but all the answers I get are outdated and uses depreciated mysql, how can I just display the rows with PDO ?
Thanks !