将数组存储到数据库php

时间:2016-11-01 19:10:00

标签: php mysql arrays

嗨guyz我想将我的多个数组值存储到数据库实际使用的动态行表中,所以我必须在这里使用数组代码

 $query_values=array(); 
 $count = count($_POST['c1']);

 for($i=0; $i<$count; $i++)
{
$c11 =$_POST['c11'][$i];
  $c31 = $_POST['c31'][$i];
       $c41 =$_POST['c41'][$i];
       $c51 = $_POST['c51'][$i];
        $c1 = $_POST['c1'][$i];
        $c2 =$_POST['c2'][$i];
         $c3 = $_POST['c3'][$i];
              $c4 = $_POST['c4'][$i];
          $c5 =$_POST['c5'][$i];
         $fc_id1 = $_POST['c11'][$i];
             $fc_id2 = $_POST['c31'][$i];
         $fc_id_total=($fc_id1.$fc_id2);
      $query_values = "                     ('$c11','$c31','$c41','$c51','$c1','$c2','$c3','$c4','$c5','$fc_id_total') ";
 }

现在我不知道如何在数据库mysql中存储数组,请帮助我

1 个答案:

答案 0 :(得分:2)

What
    in the
     hell is
        happening
            here?
            I seriously
            don\'t get
                it,
                what
            is going on.
            "i donot know what
         is wrong
           in this
     happening"