Convert a string from one character-set to another in PHP

Description

The following code shows how to convert a string from one character-set to another.

Example


  /*from  ww w  . java2 s  .  c o m*/
<?php
    $str = "Hello world! ???";
    echo $str . "<br>";
    echo convert_cyr_string($str,'w','a');
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone