Hye Guys !!
I need your help ! Here are 2 elements:
$string = "Legend Of Zelda";
$array = array("to","of","at");
I'd like to check if $string contains one of the $array elements and lowercase it. Tried this, but failed ... i got the felling that the first element of the preg_replace should be a pattern or so ?
echo preg_replace($array, mb_strtolower($array), $string);
Any idea ? Thanks a lot from France !
string
as parameter, not an array. How do I get PHP errors to display? might help with errorsforeach($array as $element) $string = str_ireplace($element, strtolower($element), $string);
. You simply can adopt to mb.