How to replace all occurrences of a word in a string ignoring case (Case-insensitive) in PHP

1 Answer

0 votes
$s = str_ireplace("php", "Java", "PHP code php code Php CODE");
echo $s; 


/*
run:
    
Java code Java code Java CODE 
      
*/

 



answered Jul 19, 2016 by avibootz
...