I have four arrays $V1, $V2, $V3, $V4 and for this I did the following code but the data are not inserted:
$max_count = max(array(count($_POST['kw_coukw']), count($_POST['combin_kws']), count($_POST['combined_kws']), count($_POST['combine_kws_city'])));
for($cat1 = 0; $cat1 < $max_count; $cat1++) {
if($cat1 <= count($_POST['kw_coukw'])){
$V1 = $_POST['kw_coukw'][$cat1];
}else{
$V1 = 0;
}
if($cat1 <= count($_POST['combin_kws'])){
$V2 = $_POST['combin_kws'][$cat1];
}else{
$V2 = 0;
}
if($cat1 <= count($_POST['combined_kws'])){
$V3 = $_POST['combined_kws'][$cat1];
}else{
$V3 = 0;
}
if($cat1 <= count($_POST['combine_kws_city'])){
$V4 = $_POST['combine_kws_city'][$cat1];
}else{
$V4 = 0;
}
$qry = "INSERT INTO seo_sentence_rl_pg_create_kw (seo_sent_pg_cre_id,kw_1_id,kw_124_id,kw_1234_id,kw_1234_city_id,customized_keyword,customized_title,description) VALUES ('".$_POST['pagenm']."','".$V1."','".$V2."','".$V3."','".$V4."','".$_POST['cuskeyword']."','".$_POST['custitle']."','".$_POST['description']."')";
}
mysqli_orPDOmysql_database extension in new code this happens it is deprecated and has been for years and is gone for ever in PHP7. If you are just learning PHP, spend your energies learning thePDOormysqlidatabase extensions and prepared statements. Start here