title: array_keys returns Array in php
body: <p>i have this function </p>
  
  <pre><code>protected function insert($data){
          $data['datecreated'] = date('Y-m-d h:i:s');
          echo "array_keys(data) = ".$data['datecreated'];
          var_dump($data);
          echo array_keys($data);
          $sql = "INSERT INTO {$this-&gt;table_name} (".  array_keys($data).")"; 
          $sql.= " VALUES ('";
          $sql.=implode("','", $data);
          $sql.=")";
          $this-&gt;execute($sql);
          $this-&gt;last_id = mysql_insert_id();
      }
  </code></pre>
  
  <p>when i read the <code>array_keys($data)</code> it returns 'Array' not the key 
  i call it like this <code>$this-&gt;insert(array());</code> why is that ? 
  EDIT : 
  this is the output </p>
  
  <pre><code>array_keys(data) = 2012-05-18 04:44:46array(2) { [0]=&gt; array(0) { } ["datecreated"]=&gt; string(19) "2012-05-18 04:44:46" } Array
  Notice: Array to string conversion in /Applications/MAMP/htdocs/Tamara/model/dbTable.php on line 105
  INSERT INTO account (Array) VALUES ('Array','2012-05-18 04:44:46)You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2012-05-18 04:44:46)' at line 1
  </code></pre>