PHP strtoupper() Function
In this chapter you will learn:
- Definition for PHP strtoupper() Function
- Syntax for PHP strtoupper() Function
- Parameter for PHP strtoupper() Function
- Return for PHP strtoupper() Function
- Example - Convert string to uppercase
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/*from ja v a 2 s. c o m*/
$string = "PHP from java2s.com";
$a = strtoupper($string);
print($a);
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP strtr() Function
- Syntax for PHP strtr() Function
- Parameter for PHP strtr() Function
- Return for PHP strtr() Function
- Note for PHP strtr() Function
- Example - Replace the characters "jav" in the string with "PHP"
- Example - Replace the string "Hello world" with "Hi java2s.com"
Home » PHP Tutorial » PHP String Functions