title: php : use str_replace( ); on some condition?
body: <p>my text:</p>
  
  <blockquote>
    <p>bob have message123 and alice has message</p>
  </blockquote>
  
  <p>i want:</p>
  
  <blockquote>
    <p>bob have newmessage and alice has newmessage</p>
  </blockquote>
  
  <p>My current code is:</p>
  
  <pre><code>$fullText= str_replace("message123", "newmessage", $fulltext);
  $fullText= str_replace("message", "newmessage", $fulltext);
  </code></pre>
  
  <p>but it becomes:</p>
  
  <blockquote>
    <p>bob have newnewmessage and alice has newmessage</p>
  </blockquote>
  
  <ul>
  <li>'new' is repeated because str_replace(); search whole text and find replace again.</li>
  <li>is it possible not to replace the text which is already replaced.</li>
  </ul>