title: PHP how to add slashes into array
body: <p>i have a problem i want to add slashes at the starting and the end of each string of my array.</p>
  
  <p>This is an example of my actual array :</p>
  
  <pre><code>$patte = array();
  $patte[0] = "httpd";
  $patte[1] = "vsftpd";
  $patte[2] = 'gohphp';
  $patte[3] = 'abcdef';
  </code></pre>
  
  <p>i use this array for taking information into a DataBase so i can't place slashes now, or this is going to not working.</p>
  
  <p>(mysql_query ... while mysql_fetch_array ...)</p>
  
  <p>I need to rename these entry.
  For this i use a second array, and with the command : "preg_replace" i can translate every strings like i want.
  But preg_replace want me to add slashes in $patte</p>
  
  <p>I want to obtain an array like this</p>
  
  <pre><code>$pattes = array();
  $pattes[0] = "/httpd/";
  $pattes[1] = "/vsftpd/";
  $pattes[2] = '/gohphp/';
  $pattes[3] = '/abcdef/';
  </code></pre>
  
  <p>Can you help me please.
  I'm gonna have like 1000 line into this array.</p>