• PHP Video Tutorials

PHP - Function setlocale



Syntax

string setlocale ( int $category , array $locale )

Definition and Usage

It is used to set locale information

Return Values

It returns the new current location

Parameters

Sr.No Parameters & Description
1

constant

It contains the information about what locale should be set

2

location

It contains the information about country or region

Example

Try out the following example

<?php
   echo setlocale(LC_ALL,"UK");
   echo "<br>";
   echo setlocale(LC_ALL,NULL);
?>

This will produce following result −

C
php_function_reference.htm
Advertisements