String Replacement

From: Date: Mon, 15 Jan 2001 03:24:49 +0000
Subject: String Replacement
Groups: php.windows 
Request: Send a blank email to php-windows+get-5014@lists.php.net to get a copy of this message
Hello all, Hope you all had a nice weekend. Simple question, I think. I would like to find all occurance of: boy or boys and replace it with: girl or girls respectively. My problem is that using the str_replace function like this: str_replace("boy","girl","$string"); turns boys into girls. I guess I want an exact match or some fuzzy intelligent thing. Did I explain myself well. This isn't so easy to write down. Thanks in advance. Take care. -Flint

« previous php.windows (#5014) next »