I'm trying PDO for database connection. somehow I get this error.. or notice but I dont know why, and it doesnt output the name...
Notice: Array to string conversion in (location) on line 31, which is
(print $row[0] . "\t";)
I dont know why?
Full code:
$query = "SELECT naam FROM paginas";
try
{
$stmt = $db->prepare($query);
$result = $stmt->execute();
}
catch(PDOException $ex)
{
die("Failed to run query: " . $ex->getMessage());
}
$row = $stmt->fetchALL();
print $row[0] . "\t";
Greetings, Merijn
$row[0]?var_dump($row[0])