title: Column count doesn't match value count at row 1 - But I have 27 columns and 27 values? PHP MySQL error
body: <p>Here is my array:</p>
  
  <pre><code>$person = array(
      "fullname" =&gt; $fn,
      "skin_shade" =&gt; $_POST['skin_shade'],
      "acne" =&gt; $_POST['acne'],
      "dry_skin" =&gt; $_POST['dry_skin'],
      "oily_skin" =&gt; $_POST['oily_skin'],
      "wrinkles_aging" =&gt; $_POST['wrinkles_aging'],
      "sensative_skin" =&gt; $_POST['sensative_skin'],
      "darkspots" =&gt; $_POST['darkspots'],
      "hair_type" =&gt; $_POST['hair_type'],
      "parabens" =&gt; $_POST['parabens'],
      "sulfates" =&gt; $_POST['sulfates'],
      "mineral_oil" =&gt; $_POST['mineral_oil'],
      "silicones" =&gt; $_POST['silicones'],
      "relaxed" =&gt; $_POST['relaxed'],
      "colortreated" =&gt; $_POST['colortreated'],
      "thinning" =&gt; $_POST['thinning'],
      "growth" =&gt; $_POST['growth'],
      "braidout" =&gt; $_POST['braidout'],
      "roller" =&gt; $_POST['roller'],
      "wng" =&gt; $_POST['wng'],
      "heat" =&gt; $_POST['heat'],
      "wig" =&gt; $_POST['wig'],
      "braid" =&gt; $_POST['braid'],
      "dreadlocks" =&gt; $_POST['dreadlocks'],
      "henna" =&gt; $_POST['henna'],
      "hair_color" =&gt; $_POST['hair_color'],
      "hair_style" =&gt; $_POST['hair_style'],
  );
  </code></pre>
  
  <p>And here is where I try to insert it and get the error:</p>
  
  <pre><code>$columns = implode(", ",array_keys($person));
  $escaped_values = array_map('mysql_real_escape_string', array_values($person));
  $values = implode(", ", $escaped_values);
  $sql = "INSERT INTO people ($columns) VALUES ('$values')";
  mysql_query($sql) or die (mysql_error());
  </code></pre>
  
  <p>I also used print_r on the columns and values to make sure they are the same size:</p>
  
  <pre><code>print_r($columns); echo"&lt;/br&gt;&lt;/br&gt;";
  print_r($values);
  </code></pre>
  
  <p>Here is the output I get for that: </p>
  
  <blockquote>
    <p>fullname, skin_shade, acne, dry_skin, oily_skin, wrinkles_aging,
    sensative_skin, darkspots, hair_type, parabens, sulfates, mineral_oil,
    silicones, relaxed, colortreated, thinning, growth, braidout, roller,
    wng, heat, wig, braid, dreadlocks, henna, hair_color, hair_style</p>
    
    <p>Chris Runo, 2, No, Yes, No, Yes, Yes, No, Straight, No, No, No, No,
    No, No, No, Yes, No, No, No, No, No, No, No, No, dark_brown, classic</p>
  </blockquote>
  
  <p>I also checked my MySQL table and there are 27 columns.</p>