PHP - localeconv 函数



语法

array localeconv ( void )

定义和用法

用于获取数字格式信息。

返回值

根据 `setlocale()` 设置的当前区域设置返回数据。

示例

尝试以下示例

<?php
   setlocale(LC_ALL,"US");
   $locale_info = localeconv();
   
   print_r($locale_info);
?>

这将产生以下结果:

Array ( [decimal_point] => . [thousands_sep] => [int_curr_symbol] => [currency_symbol] => 
[mon_decimal_point] => [mon_thousands_sep] => [positive_sign] => [negative_sign] => 
[int_frac_digits] => 127 [frac_digits] => 127 [p_cs_precedes] => 127 [p_sep_by_space] => 127 
[n_cs_precedes] => 127 [n_sep_by_space] => 127 [p_sign_posn] => 127 [n_sign_posn] => 127 
[grouping] => Array ( ) [mon_grouping] => Array ( ) )
php_function_reference.htm
广告
© . All rights reserved.