How can I bind an array of strings with a mysqli prepared statement?
Since PHP 8.1 you can pass an array directly to execute: $sql = “INSERT INTO users (email, password) VALUES (?,?)”; // sql $stmt = $mysqli->prepare($sql); // prepare $stmt->execute([$email, $password]); // execute with data! For the earlier versions the task is a bit elaborate but doable. For a simple case when you already have a query … Read more