w3resource

PHP: strtoupper() function

PHP: Make a string uppercase

The strtoupper() function is used to convert all alphabetic characters of a string to uppercase.

Version:

(PHP 4 and above)

Syntax:

strtoupper(string1)

Parameter:

Name Description Required /
Optional
Type
string1 The input string. Required String

Return value:

The uppercased string.

Value Type: String.

Pictorial Presentation

string_strtoupper

Example of php strtoupper() function

<?php
$string1="Welcome to w3resource.com";
echo strtoupper($string1); 
?>

Output:

WELCOME TO W3RESOURCE.COM

View the example in the browser

See also

PHP Function Reference

Previous: strtolower
Next: strtr



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/php/function-reference/strtoupper.php