I am Using foreach loop for array.
i have two set of arrays
i want to pass these two array from one foreach loop code:
//getting variables from form
$lists=$_POST['list'];
$assigndue=$_POST['assign'];
//foreach loop
foreach (array_combine($lists,$assigndue) as $listitem => $due)
{
$qqu="INSERT INTO `todolist`(`todoid`,`listdetail`,`assign`,`order`)VALUES('$todoidd','$listitem','$due','$o')";
$ins=mysql_query($qqu);
}
every thing is working fine but i have face an issue when array is like that >>
Array
(
[0] => s
[1] => s
[2] => s
[3] => a
)
its return this queries
INSERT INTO `todolist`(`todoid`,`listdetail`,`assign`,`order`)VALUES('8','s','Select Email','1')
INSERT INTO `todolist`(`todoid`,`listdetail`,`assign`,`order`)VALUES('8','a','Select Email','2')
its combine the 's' in the array .
i dont know what to do next please help me to do it.