String Functions

PHP convert_cyr_string() Function

Topic: PHP String ReferencePrev|Next

Description

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

The following table summarizes the technical details of this function.

Return Value: Returns the converted string.
Version: PHP 4+

Syntax

The basic syntax of the convert_cyr_string() function is given with:

convert_cyr_string(string, from, to);

The following example shows the convert_cyr_string() function in action.

<?php
// Sample string
$str = "Hello world! æøå";

// Display converted string
echo convert_cyr_string($str, 'w', 'a');
?>

Parameters

The convert_cyr_string() function accepts the following parameters.

Parameter Description
Required — The following parameters are required
string Specifies the string to be converted.
from Specifies the source Cyrillic character set, as a single character
to Specifies the target Cyrillic character set, as a single character.
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties