LanceT Posted February 8, 2007 Share Posted February 8, 2007 I have a text field and I want to replace all instances of one string with another. For example if they use the cussword "f*ck" I want to replace it with "fudge" or something like that. Then place it in the mysql database. How would I do this? Link to comment https://forums.phpfreaks.com/topic/37577-replacing-all-instances-of-a-string-with-another-string/ Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 str_replace() Link to comment https://forums.phpfreaks.com/topic/37577-replacing-all-instances-of-a-string-with-another-string/#findComment-179699 Share on other sites More sharing options...
LanceT Posted February 8, 2007 Author Share Posted February 8, 2007 what actually checks to see if the initial string is there? Link to comment https://forums.phpfreaks.com/topic/37577-replacing-all-instances-of-a-string-with-another-string/#findComment-179702 Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 strpos Link to comment https://forums.phpfreaks.com/topic/37577-replacing-all-instances-of-a-string-with-another-string/#findComment-179706 Share on other sites More sharing options...
LanceT Posted February 8, 2007 Author Share Posted February 8, 2007 could you help me with some actual code? Thanks. Link to comment https://forums.phpfreaks.com/topic/37577-replacing-all-instances-of-a-string-with-another-string/#findComment-179709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.