title: Inserting associative array into mysql table
body: <p>I need to insert the following array into a mysql table with columns name,title,url,logo. I created the table and wrote a query to transfer the array. But it was inserting the last line of the array and leaving remaining... plz help me...
  this is my array</p>
  
  <pre><code>$con = mysql_connect("localhost","","");
  
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
  
  mysql_select_db("media", $con);
  
  $featured = array();
  
  $featured[] = array('name' =&gt; '', 'title' =&gt; '', 'url' =&gt; '', 'logo' =&gt; '');
  
  $featured[] = array('name' =&gt; '', 'title' =&gt; '', 'url' =&gt; '', 'logo' =&gt; '');
  
  $featured[] = array('name' =&gt; '', 'title' =&gt; '', 'url' =&gt; '', 'logo' =&gt; '');
  
  $featured[] = array('name' =&gt; '', 'title' =&gt; '', 'url' =&gt; '', 'logo' =&gt; '');
  
  
  
   $sql  = "INSERT INTO featured";
  
  
     $sql .= " (`".implode("`, `", array_keys($featured))."`)";
  
  
     $sql .= " VALUES ('".implode("', '", $featured)."') ";
  
  
     $result = mysql_query($sql) or die(mysql_error());
  </code></pre>