• PHP Video Tutorials

PHP - Function Localeconv



Syntax

array localeconv ( void )

Definition and Usage

It is used to get numeric formatting information

Return Values

It returns data based upon the current locale as set by setlocale().

Example

Try out the following example

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

This will produce following result − −

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
Advertisements