title: Php foreach loop inserts only part of records into mysql table
body: <p>In my mysql database I get ONLY the records for id 26, 16, 17, 18, 19, 22, 23, 24. Why is that, is there any error in my code? I don;t have a clue, please help:(</p>
  
  <pre><code>&lt;?
  $connect = mysql_connect('localhost', 'dbname', 'pass');  
  if (!$connect) { die('Could not connect: ' . mysql_error()); }
  mysql_select_db("dbname") or die(mysql_error());
  
  mysql_query("TRUNCATE TABLE anchors");
  
  $blog_ids = array(
  'anchor 1' =&gt; '1', 
  'anchor 2' =&gt; '2', 
  'anchor 3' =&gt; '3', 
  'anchor 2' =&gt; '4',  
  'anchor 2' =&gt; '5',  
  'anchor 4' =&gt; '6',  
  'anchor 5' =&gt; '7',  
  'anchor 6' =&gt; '8', 
  'anchor 7' =&gt; '9',  
  'anchor 8' =&gt; '10', 
  'anchor 9' =&gt; '13',
  'anchor 10' =&gt; '14',
  'anchor 11' =&gt; '16',
  'anchor 12' =&gt; '17', 
  'anchor 13' =&gt; '18', 
  'anchor 14' =&gt; '20', 
  'anchor 15' =&gt; '21', 
  'anchor 16' =&gt; '22', 
  'anchor 17' =&gt; '23', 
  'anchor 18' =&gt; '24', 
  'anchor 19' =&gt; '25', 
  'anchor 20' =&gt; '26' 
  );
  foreach($blog_ids as $anchor =&gt; $blog_id){
  $anchor_url = 'http://www.site.com';
  mysql_query("INSERT INTO anchors (blog_id, anchor_url, anchor) VALUES ('$blog_id', '$anchor_url', '$anchor')");
  } 
  
  mysql_close($connect); 
  ?&gt;
  </code></pre>
  
  <p>Ty very much, here is the table structure:</p>
  
  <pre><code>CREATE TABLE `anchors` (
   `id` int(11) NOT NULL auto_increment,
   `blog_id` text,
   `anchor_url` text,
   `anchor` text,
   PRIMARY KEY  (`id`),
   FULLTEXT KEY `posttitle` (`blog_id`,`anchor_url`,`anchor`)
  ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8
  </code></pre>