Dear members.I got a function what it converts int to
utf8.This means if you enter 27,function returns
25,But utf8.
I need to the function what it perform reverse of
pervious function.This means you enter 27(utf8)&
function returns 27(int).
I have searched on net & i get following function:
<?php
//===============================
$table = array (
"\x30" => "\xDB\xB0", # Persian 0
"\x31" => "\xDB\xB1", # Persian 1
"\x32" => "\xDB\xB2", # Persian 2
"\x33" => "\xDB\xB3", # Persian 3
"\x34" => "\xDB\xB4", # Persian 4
"\x35" => "\xDB\xB5", # Persian 5
"\x36" => "\xDB\xB6", # Persian 6
"\x37" => "\xDB\xB7", # Persian 7
"\x38" => "\xDB\xB8", # Persian 8
"\x39" => "\xDB\xB9", # Persian 9
);
//=====================================================
//=====================================================
function utf8 ( $str_in )
{
global $table;
$html_command = false;
$str_out="";
foreach ( preg_split ( '//' , $str_in ) as $char )
{
if ( $table[$char] && !$html_command )
{
$str_out .= $table[$char];
} else
{
$str_out .= $char;
}
if ( $char == '<' ) $html_command = true ;
if ( $char == '>' ) $html_command = false ;
}
return $str_out;
}
//=================================================
?>
Function of up,converts int to utf8.
Please help me....Please
-Shahnaz
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
FarsiWeb mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/farsiweb