title: Adding quotes to array values in php
body: <p>The following script is used to implode values from a multidimensional array and insert into the mysql table. The table contains field data types of varchar and decimal. Since varchar type requires quotes and to avoid selectively placing quotes, I would like to put all values in quotes. How to implement it?</p>
  
  <pre><code>$values = array();
  foreach ($data as $rowValues) {
      foreach ($rowValues as $key =&gt; $rowValue) {
              }
  
      $values[] = "(" . implode(', ', $rowValues) . ",'".$date."')";
  }
  
  $query = "INSERT INTO mem (memno,loan,subsc,intst, date)
            VALUES " . implode (', ', $values);
  $result=mysql_query($query) or die();
  </code></pre>
  
  <p>I want the sql like this </p>
  
  <pre><code>INSERT INTO mem (memno,loan,subsc,intst, date)
  values('value1', 'value2', 'valu3','value4','value5')
  </code></pre>