title: Insert array data into database
body: <p>I'm trying to insert array into database. Why don't this work?</p>
  
  <pre><code>$array_zone = array();
  $array_data = array();
  while($row = mysql_fetch_array($keputusan1)){
  $array_zone[] = $row['zone'];
  $array_data[] = $row['data'];
  }
  
  echo "&lt;pre&gt;";
  print_r($array_zone);
  echo "&lt;br&gt;";
  print_r($array_data);
  echo "&lt;/pre&gt;";
  
  $list_zone = implode(",", $array_zone);
  $list_data = implode(",", $array_data);
  
  for($i = 0; $i &lt; 4; $i++)
  {
  mysql_query("INSERT INTO `db`.`table1` (`id`, `domain`) VALUES ('$list_zone', '$list_data')");
  }
  </code></pre>
  
  <p>Array output before implode:</p>
  
  <pre><code>Array
  (
      [0] =&gt; 270
      [1] =&gt; 270
      [2] =&gt; 255
      [3] =&gt; 255
  )
  
  Array
  (
      [0] =&gt; ok.com.
      [1] =&gt; lo.com.
      [2] =&gt; i.com.
      [3] =&gt; k.com.
  )
  </code></pre>
  
  <p>Result I'm getting:
  <img src="https://i.stack.imgur.com/1MTS2.png" alt="phpmyadmin"></p>
  
  <p>0 key should go with data in 0 key and 1 key should go with data in 1 key and so on... Help me please. Thank you.</p>