title: how to replace the given string using preg_replace() in php?
body: <p>I am trying to replace the string by following code</p>
  
  <pre><code>$find2 = array ('/is/', '/working/'); 
   $replace2 = array ('to', 'work');
   $data="During the day, Damien is working";
   echo  preg_replace ($find2, $replace2, $data);
  </code></pre>
  
  <p>output is </p>
  
  <blockquote>
    <p>During the day, Damien to work</p>
  </blockquote>
  
  <p>but i want the result to be </p>
  
  <blockquote>
    <p>Damien to work</p>
  </blockquote>