Dec 17, 2004 #1 meeble3 Programmer Joined Nov 8, 2004 Messages 52 Location GB When I pull a word from the database, if it contains a 3 I want to swap it for a 4. So the word hgy3uy would become hgy4uy and koplw3 would become koplw4 etc Any ideas? Cheers James
When I pull a word from the database, if it contains a 3 I want to swap it for a 4. So the word hgy3uy would become hgy4uy and koplw3 would become koplw4 etc Any ideas? Cheers James
Dec 17, 2004 #2 Vragabond Programmer Joined Jul 23, 2003 Messages 5,100 Location AT How about str_replace: Code: $newstring = str_replace("3","4",$string); Upvote 0 Downvote