3
Because the following code works:
$stmt = $pdo->prepare("SELECT * FROM dados");
$stmt->execute();
$codigos = $stmt->fetch();
echo $codigos['codigo'];
And so I can’t use?
$stmt = $pdo->prepare("SELECT * FROM dados");
$stmt->execute();
$codigos = $stmt->fetchAll();
echo $codigos['codigo'];
what I do to access positions of this matrix that it returns to me?
– Thiago Freitas
With the code described above, making a foreach, you will be able to access each loop of the array.
– Leonardo Patricio