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
Use for loop for this operation as there are no associative arrays involved
if(isset($_POST['submit'])){
$name = array();// initialize it first for a good coding standard
$roll = array();// initialize it first for a good coding standard
$name = $_POST['name'];
$roll = $_POST['roll'];
for($i=0;$iprepare($sql);
$query->bindparam(':roll', $name[$i]);
$query->bindparam(':name', $roll[$i]);
$query->execute();
}
}