Hi guys i was trying whole my week to solve this problem. I want to set my tables "isim" column with array. But the bot fills this column with array[1] in all rows. I want to set each row with each element of array but its filled with the same element always. This is the relevant code:
for($a=0; $a<=29; $a++){
//echo ($dizi[1][$a]."<br />");
foreach (array($dizi[1][$a]) as $dizipub2){
$query = $db->prepare("UPDATE diziler SET diziisim=?");
$Insert = $query->execute(array("$dizipub2"
)); break;
if ($Insert){
$last_id = $db->lastInsertId();
echo ("Kaydedildi");break;}
}
I've tried deleting // before echo and what is the output of it. It's correct. Gives elements perfectly. I guess something wrong with foreach. How can i do that?