Answers for "php function that allows you to replace text in a string (without taking into account upper / lower case)"

PHP
1

php uppercase with accent

<?php
function strtoupperWithAccents($string) {
   $string = strtoupper($string);
   $string = str_replace(
      array('é', 'è', 'ê', 'ë', 'à', 'â', 'î', 'ï', 'ô', 'ù', 'û'),
      array('É', 'È', 'Ê', 'Ë', 'À', 'Â', 'Î', 'Ï', 'Ô', 'Ù', 'Û'),
      $string
   );
   return $string;
}
Posted by: Guest on October-15-2021
0

is replace case sensitive php

//Will make sure to replace anything that matches
str_ireplace()
Posted by: Guest on May-22-2021

Code answers related to "php function that allows you to replace text in a string (without taking into account upper / lower case)"

Browse Popular Code Answers by Language