title: How do I use str_replace with a search array and replace it with part of the search array that was found?
body: <p>I am doing a str_replace with a search array and I want to replace it with a string that includes the value in the array that was found.</p>
  <p>This is my search array</p>
  <pre><code>$search_array = array(&quot;**JOB DESCRIPTION1**&quot;,&quot;**JOB DESCRIPTION2**&quot;,&quot;**JOB DESCRIPTION3**&quot;);
  </code></pre>
  <p>This is my string</p>
  <pre><code>$string = &quot;**JOB DESCRIPTION1** does this objective, and **JOB DESCRIPTION2** does this.&quot;
  </code></pre>
  <p>I want to replace it with a button that says &quot;Click here to replace JOB DESCRIPTION1&quot;.</p>
  <p>I am trying something like this, but it fails.</p>
  <pre><code>$new_string = str_replace($search_array,'&lt;button&gt;Click here to replace '.$search_array.'&lt;/button&gt;',$string)
  </code></pre>