how to use this function with different languages ? $new_string = ereg_replace("[^A-Za-z0-9]", "", $string);
First of all function ereg_replace() has been deprecated in the new PHP. You should use consider using preg_replace(). Second, try using mb_internal_encoding('utf-8'); before you make a replace. Hope this helps.