PHP strtoupper() Function

Definition

The strtoupper() function converts string to uppercase.

Syntax

PHP strtoupper() Function has the following syntax.

string strtoupper ( string str )

Parameter

str is the string value we want to convert.

Return

PHP strtoupper() function returns the string in uppercase.

Example

Convert string to uppercase


<?PHP/* w w w .j a v a 2  s  .  c  o  m*/
$string = "PHP from java2s.com"; 
$a = strtoupper($string); 
print($a);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions