I need help with prevent from "Notice: Array to string conversion in "
$stmt = $DBH->prepare("SELECT * FROM users WHERE id = :emailid");
$stmt->bindParam(':emailid', $emailid, PDO::PARAM_STR);
$stmt->execute();
$result = $stmt->fetchAll();
foreach($result as $row)
{
echo $row['id'].'<br />';
echo $row['emailid'].'<br />';
echo $row['password'];
}
Everythink its OK, index.php?id=5
but when i put index.php?id[]=5
Return me error
Notice: Array to string conversion in
What is the best way to check for arrays in this case; error_reporting(0)
is not a solution I want to find optimized method.