par moogli » 30 mars 2013, 14:17
par sirakawa » 30 mars 2013, 09:48
par moogli » 29 mars 2013, 16:58
par dawadam » 29 mars 2013, 13:19
setlocale(LC_ALL,'fr_FR.UTF-8');
par Peyothe » 04 août 2009, 22:50
par thehawk » 04 août 2009, 15:33
par Victor BRITO » 04 août 2009, 15:13
Est-ce que le code fonctionne bien chez toi ?
par Peyothe » 04 août 2009, 13:44
par Victor BRITO » 04 août 2009, 13:42
Code : Tout sélectionner
function simpleName ($chaine) { $string = iconv ('UTF-8', 'US-ASCII//TRANSLIT//IGNORE', utf8_encode ($chaine)); $string = preg_replace ('#[^.0-9a-z]+#i', '', $string); $string = strtolower ($string); return $string; } // Affiche hotelplazza echo simpleName ('Hôtel Plazza');
par Peyothe » 04 août 2009, 13:35
par Victor BRITO » 04 août 2009, 13:33
par thehawk » 04 août 2009, 13:32
par Peyothe » 04 août 2009, 13:22
string(5) "UTF-8"
par Victor BRITO » 04 août 2009, 13:19
var_dump (mb_detect_encoding ('Hôtel Plazza au cœur… €'));
par Peyothe » 04 août 2009, 13:12
array(3) { ["input_encoding"]=> string(10) "ISO-8859-1" ["output_encoding"]=> string(10) "ISO-8859-1" ["internal_encoding"]=> string(10) "ISO-8859-1" }