Skip to content

Instantly share code, notes, and snippets.

View antoniogarcia78's full-sized avatar

Antonio Garcia Marin antoniogarcia78

View GitHub Profile
@antoniogarcia78
antoniogarcia78 / paises.csv
Last active August 16, 2017 10:30 — forked from brenes/README.md
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país
nombre name nom iso2 iso3 phone_code
Afganistán Afghanistan Afghanistan AF AFG 93
Albania Albania Albanie AL ALB 355
Alemania Germany Allemagne DE DEU 49
Algeria Algeria Algérie DZ DZA 213
Andorra Andorra Andorra AD AND 376
Angola Angola Angola AO AGO 244
Anguila Anguilla Anguilla AI AIA 1 264
Antártida Antarctica L'Antarctique AQ ATA 672
Antigua y Barbuda Antigua and Barbuda Antigua et Barbuda AG ATG 1 268
function limpiarAcentos($cadena) {
$conAcento = array('á','à','â','è','é','ê','í','î','ì','ó','ò','ô','ú','ù','û',
'Á','À','Â','È','É','Ê','Í','Î','Ì','Ó','Ò','Ô','Ú','Ù','Û');
$sinAcento = array('a','a','a','e','e','e','i','i','i','o','o','o','u','u','u',
'A','A','A','E','E','E','I','I','I','O','O','O','U','U','U');
return str_replace($conAcento,$sinAcento,$cadena);
}
@antoniogarcia78
antoniogarcia78 / gist:322f0fbe863f2127beee
Created September 16, 2015 12:18
Check if a value is numeric (avoid array a null from DB)
function isNumeric($v) {
if(is_null($v)) {
return false;
}
if(is_array($v)) {
return false;
}
return is_numeric(intval($v));
}
Uno de webs con RSS : http://www.webcreme.com/