function utf8_to_true ($s) {
        return true;
}

be


On Sun, 7 Sep 2003, Mohsen Pahlevanzadeh wrote:

> Hi dears.
> Mr.Tavakkolian was helping me until my function completed.
> This function converts utf8(digit) to integer.
> $farsi_table_linux=array("NONE",
>                     "۰",
>                     "۱",
>                     "۲",
>                     "۳",
>                     "۴",
>                     "۵",
>                     "۶",
>                     "۷",
>                     "۸",
>                     "۹");
> function search_index_array($str)
> {
>  global $farsi_table;
>  
>  for ($i=0;$i<11;$i++) 
>  { 
>   if ($farsi_table[$i]==$str ) 
>    return $i; 
>  } 
>  return FALSE;
> }// end of search_index_array
> ////////////////////////////////
> function utf8_to_int($str)
> {
>  $len=strlen($str);
>  $out="";
>  $char=explode(";",$str);
>  for ($i=0;$i<$len;$i++)
>   { 
>    $char[$i].=";";
>    if (search_index_array($char[$i])!=False)
>      $out.=search_index_array($char[$i])-1;
>   }//end of for ($i)
>  return $out; 
> }//end of utf8_to_int
> When i call utf8_to_int("&#1776;"."&#1785;") ,this return 09 ,But When i enter a 
> number(utf8) via keyboard,This function return 0.
> Please guide me that i how enter a number via keyboard(persian) & i get true answer.
> --regards
> 
> _____________________________________________________________
> Thank you for choosing LinuxQuestions.
> http://www.linuxquestions.org
> _______________________________________________
> FarsiWeb mailing list
> [EMAIL PROTECTED]
> http://lists.sharif.edu/mailman/listinfo/farsiweb
> 

-- 
Behdad Esfahbod         17 Shahrivar 1382, 2003 Sep 8 
http://behdad.org/      [Finger for Geek Code]

If you do a job too well, you'll get stuck with it.

_______________________________________________
FarsiWeb mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/farsiweb

Reply via email to