bonjour
cette fonction a le message
Fatal error : Array and string offset access syntax with curly braces is no longer supported in /home/clients/a3580510d3989b69fb26134d5ef34fc5/sites/bianco/squelettes/mes_fonctions.php on line 52
pour
`//extrait la premiere lettre et la passe en majuscules
function onelettre($texte) {
$texte = $texte{0}; // premiere lettre —— et ligne 52
// remplacement des caracteres accentues
// exemple trouve ici :
// PHP: strtr - Manual
$texte = strtr($texte, « \xA1\xAA\xBA\xBF\xC0\xC1\xC2\xC3\xC5\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD8\xD9\xDA\xDB\xDD\xE0\xE1\xE2\xE3\xE5\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF8\xF9\xFA\xFB\xFD\xFF », « !ao?AAAAACEEEEIIIIDNOOOOOUUUYaaaaaceeeeiiiidnooooouuuyy »);
$texte = strtr($texte, array("\xC4"=>« Ae », « \xC6 »=>« AE », « \xD6 »=>« Oe », « \xDC »=>« Ue », « \xDE »=>« TH », « \xDF »=>« ss », « \xE4 »=>« ae », « \xE6 »=>« ae », « \xF6 »=>« oe », « \xFC »=>« ue », « \xFE »=>« th »));
return $texte;
$texte = strtoupper($texte); // tout en majuscules
return $texte;
}
function transcribe($texte) {
$texte = $texte{0};
$texte = strtr($texte,
« \xA1\xAA\xBA\xBF\xC0\xC1\xC2\xC3\xC5\xC7
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
\xD2\xD3\xD4\xD5\xD8\xD9\xDA\xDB\xDD\xE0
\xE1\xE2\xE3\xE5\xE7\xE8\xE9\xEA\xEB\xEC
\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF8
\xF9\xFA\xFB\xFD\xFF »,
« !ao?AAAAAC
EEEEIIIIDN
OOOOOUUUYa
aaaaceeeei
iiidnooooo
uuuyy »);
$texte = strtr($texte, array("\xC4"=>« Ae », « \xC6 »=>« AE », « \xD6 »=>« Oe », « \xDC »=>« Ue », « \xDE »=>« TH », « \xDF »=>« ss », « \xE4 »=>« ae », « \xE6 »=>« ae », « \xF6 »=>« oe », « \xFC »=>« ue », « \xFE »=>« th »));
return($texte);
}`