strtoupper

string strtoupper(string string) 

Convert a string to uppercase.

Returns:

Uppercase string

Description:

strtoupper() converts all lowercase alphabetical characters within a string to their uppercase equivalents.

Note:

The conversion from lowercase to uppercase is dependent upon the current locale. Use setlocale() to set or query the locale.

Version:

PHP 3+, PHP 4+

See also:

To alter the case of a string:

strtolower() 
ucfirst() 
ucwords() 

Example:

Make a string uppercase
<?php 
$email_subject = "Hello, my name is loud howard."; 
echo strtoupper ($email_subject); 
?> 

Output: 
HELLO, MY NAME IS LOUD HOWARD. 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.