Possible Duplicate:
PHP string replace match whole word
What I want to do is to replace Tomato with Apple for example. The Probleim I'm running in is:
when the string contains "Tomatos" (mention the s) it will replace Tomato and leafe me with a string "Apples" (again mention the s).
Because "Tomato" != "Tomatos" (...s) it shall NOT replace.
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.
€
The words are seperated with ",".