I have created two arrays and i want to add there alternate values in a database table
foreach($aaa[$key] as $key2 and $bbb[$key] as $key3) {
$qd = "INSERT INTO aaa (xxx, yyy, status) VALUES ('$key2', '$key3', '1')";
$dd = mysqli_query($conn, $qd);
if ($dd) {
echo '1';
} else {
echo mysqli_error($conn);
}
}