如何将数组传递到数据库

how to pass array into database

我正在尝试将数组传递到数据库中,但无法正确传递。 我有以下数据库行

Country, number, Page, date

并希望在我的数据库中有这样的东西

id    Country  number   Page   date
2     Sweden   5        cat    14th june 2015
      United   10       ind    14th june 2015   
      states   58       con    14th june 2015    
      France   101      aces   14th june 2015      
      Germany  200      ind    14th june 2015

我正在使用这个

if(isset($_POST['submit'])){
$new_res = mysql_query("INSERT INTO `em-res_db` VALUES('','$Country','$number','$Page','$date')");  
                if ($new_res){
                    //continue
    }

我希望你能理解我正在尝试做的事情

创建一个与数组长度相同的循环,并在循环中插入要向数据库插入数据的代码。

示例

for(i=0;i<=count(array)-1;i++){
if(isset($_POST['submit'])){
$new_res = mysql_query("INSERT INTO `em-res_db` VALUES('','$Country','$number','$Page','$date')");  
                if ($new_res){
                    //continue
    }
}