How to replace just complete words in PHP?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3426265/php-string-replace-match-whole-word">PHP string replace match whole word</a>  </p>
</blockquote>



<p>What I want to do is to replace Tomato with Apple for example.
The Probleim I'm running in is:</p>

<p>when the string contains "Tomatos" (mention the s) it will replace Tomato and leafe me with a string "Apples" (again mention the s).</p>

<p>Because "Tomato" != "Tomatos" (...s) it shall NOT replace.</p>

<p>Which PHP funktion is good for this task?
I tried the str_replace function but it seems like it isn't possible to archive my task with it.</p>

<hr>

<p>€</p>

<p>The words are seperated with ",".</p>
