'PDO : using bound parameters inside a function
I am using PDO to connect to MySQL, and I have an issue as follows : Given that code
$stmt = $conn->prepare($query);
$stmt->bindParam(':param0', $params[0]);
$stmt->bindParam(':param1', $params[1]);
$stmt->bindParam(':param2', $params[2]);
Then, I want to call a function foo($stmt,...), How can I use the array $params inside that function which would assign new values for each element of the $params array?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
