fonction convert_cyr_string PHP ()
Exemples
String à partir d'un jeu de caractères dans une autre:
<?php
$str = "Hello world! aa";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>
$str = "Hello world! aa";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>
Exécution instance »
Définition et utilisation
convert_cyr_string () pour une chaîne à partir d'un jeu de caractères cyrillique dans un autre.
Pris en charge le jeu de caractères cyrillique est:
- k - koi8-r
- w - fenêtres-1251
- i - ISO8859-5
- a - x-CP866
- d - x-CP866
- m - x-mac-cyrillique
Remarque: Cette fonction est sûr binaire.
grammaire
convert_cyr_string( string,from,to )
参数 | 描述 |
---|---|
string | 必需。规定要转换的字符串。 |
from | 必需。一个规定了源 Cyrillic 字符集的字符。 |
to | 必需。一个规定了目标 Cyrillic 字符集的字符。 |
détails techniques
Retours: | Renvoie la chaîne convertie. |
---|---|
PHP version: | 4+ |
PHP Chaîne de référence