Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php regex replace to remove special characters and accented

$unwanted_array = array(    'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
                            'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',
                            'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',
                            'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',
                            'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );
$str = strtr( $str, $unwanted_array );
Comment

PREVIOUS NEXT
Code Example
Php :: get all class methods php 
Php :: create array php 
Php :: wp php category page count products 
Php :: how to write orderby in join query with where clause in codeigniter 
Php :: laravel file store 
Php :: Carbon Add Years To Date In Laravel 
Php :: php strlen 
Php :: how to make model and controller in laravel 
Php :: quitar guiones en string php 
Php :: laravel eloquent update 
Php :: php null 
Php :: contact form 7 get form id 
Php :: laravel all fillable 
Php :: real time update using ajax php 
Php :: php array sort by key 
Php :: php unit 
Php :: - in php 
Php :: laravel create on model 
Php :: php detect crawler 
Php :: symfony messenger transport 
Php :: php get property with ~ 
Php :: livewire from one component to another 
Php :: how to upload large video file in php 
Php :: eloquent first 
Php :: PHP Example - AJAX Live Search 
Php :: microft access request database with pdo 
Php :: how to free session variable in php codeigniter 
Php :: how to wirte laravel dd function in php 
Php :: laravel sharing record 
Php :: php exit 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =