Skip to content

Instantly share code, notes, and snippets.

View zerobugs-oficial's full-sized avatar

Zero Bugs zerobugs-oficial

View GitHub Profile
@zerobugs-oficial
zerobugs-oficial / remover_acentos.php
Last active June 19, 2020 14:58
Limpar acentuação de strings
function remover_acentos($string) {
if ( !preg_match('/[\x80-\xff]/', $string) )
return $string;
$chars = array(
chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',
chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',
chr(195).chr(135) => 'C', chr(195).chr(136) => 'E',