I\'m learning and new in PDO. The usage of array in PDO causes difficulty for me. I\'m developing simple web application using PDO syntax. Everything is going on smoothly, but I
How about you prepare the statement outside the loop, then bind the values within the loop and execute.
prepare($sql); foreach($roll as $key => $n){ $query->bindParam(':roll', $n[$key]); $query->bindParam(':name', $name[$key]); $query->execute(); } }