title: How to update Mysql using array in php in a dynamic way
body: <p>I made a post array when i print it,I am getting following output.</p>
  
  <p><code>
  Array
  (
      [name] =&gt; gowtham
      [content] =&gt; Nice Website
  )</code></p>
  
  <p><strong>where Key of array is a column name in my database and value is value in database.
  i want to update my database using these values,but these values in post array changes basing on html form.</strong>  </p>
  
  <p>i made a string using implode.</p>
  
  <p><code>$query ="UPDATE ".$_SESSION['table']." SET ".implode(' = ',$array);</code></p>
  
  <p>but my output is</p>
  
  <p><code>UPDATE testimonials SET gowtham = Nice Website</code></p>
  
  <p>i want output as </p>
  
  <p><code>UPDATE testimonials SET name = gowtham , content = Nice Website</code></p>
  
  <p>Please help me</p>