title: PHP MySql update() with array
body: <p>I want to update my database with the help of array,how it will be right to write the code?</p>
  
  <p>Here is my code but it gives error smth about MySql server version.</p>
  
  <pre><code> public function update($fields, $values, $id) {
          $implodeFieldsArray = implode( ',', $fields );
          $implodeValuesArray = '"'.implode( '","', $values ).'"';
          $stmt = $this-&gt;conn-&gt;prepare('UPDATE $this-&gt;tabname ('.$implodeFieldsArray.') WHERE id=$id VALUES ('.$implodeValuesArray.')');
          $stmt-&gt;execute();
      }
  </code></pre>