title: implode() array to insert record into mySql database
body: <p>I have a single row in a PHP array and I would like to insert that row into mySQL database by imploding the keys and values into a string and using those strings in my Insert statement as follows:</p>
  
  <pre><code>$fields = implode(",", array_keys($_POST));
  $newdata = implode(",", $_POST);
  
  $query = (
  "INSERT INTO Food_entered ($fields)
  VALUES ('$newdata')");
  
  $result = mysqli_query($dbc, $query);
  </code></pre>
  
  <p>I am able to create the strings, and they appear to be in proper form ,however the row is not being inserted. Seems like a simple approach but not sure what I'm missing.</p>