PHP

PHP Menu

PHP

convert_cyr_string() Function - Definition, Syntax, Parameters, Examples

Definition

The convert_cyr_string() function converts a string from one Cyrillic character set to another.

Supported Cyrillic character-sets:

  • k - koi8-r
  • w - windows-1251
  • i - iso8859-5
  • a - x-cp866
  • d - x-cp866
  • m - x-mac-cyrillic

Syntax

convert_cyr_string(string, from, to)

Parameters

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.

Example

<?php

$str = "Hello world! æøå";
echo convert_cyr_string($str, 'w', 'a');

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods