title: custom str_replace = find(same value) and replace with array
body: <p>I wonder if it's possible to create my own str_replace,  to fill in the blank see example below:</p>
  
  <pre><code>$words = array('cat','mole');
  $find='[blank]';
  $string ="Lorem ipsum -[blank]- sit amet, consectetur
                          adipiscing elit. Donec condimentum augue 
                          sit amet blandit vehicula. Nullam placerat
                          aliquam dictum. Quisque elementum nisl
                          sed pellentesque elementum. Aliquam erat
                          volutpat. Suspendisse potenti. Maecenas [blank]." 
  echo str_replace ($find,$words,$string);
  </code></pre>
  
  <p>the expected out put would be this:</p>
  
  <pre><code>Lorem ipsum -cat- sit amet, consectetur
  adipiscing elit. Donec condimentum augue 
  sit amet blandit vehicula. Nullam placerat
  aliquam dictum. Quisque elementum nisl
  sed pellentesque elementum. Aliquam erat
  volutpat. Suspendisse potenti. Maecenas mole.
  </code></pre>
  
  <p>thanks </p>
  
  <p>edit:  if i can improve this question i would  it hard to explain so i given a example instead.</p>