I made a class to connect to the database using PDO and at the time I get the data from my table it gives this error.
This is the code:
require_once('../class/connection.class.php');
$db = conection::getInstancia();
$query = $db->query("SELECT * FROM". conection::getTabela('TB_ARQUIVOS'));
foreach($query->fetchAll(\PDO::FETCH_ASSOC) as $arquivo){
echo $arquivo['Codigo'];
}
It's the error in the foreach line