title: How can i insert text into html tag in php string?
body: <p>i have been dealing with this for awhile and i could not figure out how to do the following in PHP:</p>
  
  <pre><code>$string = "this is test &lt;pre&gt;somrthing in &lt;p&gt;pharagraph&lt;/p&gt;&lt;/pre&gt; dont know tell me &lt;pre&gt;value33 kooo ok&lt;/pre&gt; this is php regress &lt;pre&gt;teeth value&lt;/pre&gt; ok how"; 
  
  function get_innercode($string) {
  preg_match_all("#&lt;pre&gt;(.*?)&lt;/pre&gt;#", $string, $foo); 
  echo implode("\n", $foo[1]); 
  }
      $insert1=get_innercode($string);
  
  
  
      $insert2=" 2 place me in the pre tag"; // you can ignore this
  
      $string="this is test  &lt;pre&gt; WHERE $insert1 SHOULD BE&lt;/pre&gt; dont know tell me  &lt;pre&gt;WHERE $insert2 SHOULD BE&lt;/pre&gt; ok how ";
  </code></pre>
  
  <p>how can i do this?
  Please note i cannot do </p>
  
  <pre><code>$string="some text here &lt;pre&gt; WHERE $insert1 SHOULD BE&lt;/pre&gt; some more text here &lt;pre&gt;WHERE $insert2 SHOULD BE&lt;/pre&gt; ok how";
  </code></pre>
  
  <p>because i am getting $insert1 and $insert2 from $string to modify. i need to place it back in there where they come from.
  thank you</p>