Is there a way to bind array params in bindParam
function of pdo
without using foreach
statement? (something like mysql.connector
in python
).
the foreach
version would be like this:
$data = array('name'=>'something','job'=>'something else');
foreach($data as $key => $value){
$stmt->bindParam(':'.$key, $value);
}