PHP case sensitive String ReplaceTo replace a part of the string with another string we will use str_replace function in PHP. This function will replace all the occurrence of the string we target and will replace with the string we supply. Here is an example.
If you run the above code your will see result like this
Here you can see the text html is replace by PHP but HTML is not replaced.
So str_replace() is a case sensitive string replacing function. We can use str_ireplace() to get case insensitive string replacement
Be the first to post comment on this article :