PHP convert_cyr_string() 함수
예시
문자열을 한 문자 집합에서 다른 문자 집합으로 변환합니다.
<?php
$str = "Hello world! æøå";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>
정의 및 사용
convert_cyr_string() 함수는 한 키릴 문자 집합에서 다른 문자 집합으로 문자열을 변환합니다.
지원되는 키릴 문자 집합은 다음과 같습니다.
- k - koi8-r
- 승 - Windows-1251
- 나는 - iso8859-5
- a - x-cp866
- d - x-cp866
- m - x-mac-키릴 자모
참고: 이 함수는 바이너리 안전합니다.
통사론
convert_cyr_string(string,from,to)
매개변수 값
Parameter | Description |
---|---|
string | Required. The string to convert |
from | Required. A character that specifies what Cyrillic character-set to convert from |
to | Required. A character that specifies what Cyrillic character-set to convert to |
기술적 세부 사항
반환 값: | 변환된 문자열을 반환 |
---|---|
PHP 버전: | 4+ |
❮ PHP 문자열 참조