Mudsaf Posted August 13, 2013 Share Posted August 13, 2013 I have code like below and i'm wondering how to replace the array if its same even if its the word is written like tHiS. $censorword = str_replace(<PHP_ARRAY>[<CENSORWORD ARRAY>], "*****" , <CONTENT>); I tried $censorword = str_replace(strtolower(<PHP_ARRAY>[<CENSORWORD ARRAY>]), "*****" , strtolower(<CONTENT>)); But the $censorword whole string is lowercase after that. Link to comment Share on other sites More sharing options...
Mudsaf Posted August 13, 2013 Author Share Posted August 13, 2013 Ah, found PHP5 function. str_ireplace() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now