w3resource

PHP: strtoupper() function

Description

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



Follow us on Facebook and Twitter for latest update.