0

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);
Xatenev
  • 6,383
  • 3
  • 18
  • 42
marciano
  • 21
  • 2
  • 6

0 Answers0