I want to store my query result in an array, so that I can convert this to Json. At the moment my result is stored in q. How can I get the result to an array`?
$sqlQuery ="SELECT * FROM data2";
$q = $pdo->query($sqlQuery);
I want to store my query result in an array, so that I can convert this to Json. At the moment my result is stored in q. How can I get the result to an array`?
$sqlQuery ="SELECT * FROM data2";
$q = $pdo->query($sqlQuery);