a shot of dev knowledge

RELATED TAGS

What is strtoupper() in PHP?

The strtoupper() function in PHP converts a string to uppercase.

The following figure shows a visual representation of the strtoupper() function.

Visual representation of the strtoupper() function

Syntax

string strtoupper(string)

Parameter

As a parameter, the strtoupper() function requires a string that is to be converted to uppercase.

Return value

The strtoupper() function returns a string that is converted to uppercase.

Code

The code below shows how the strtoupper() function works.

<?php
#string
echo("strtoupper('educative'): ");
echo (strtoupper('educative'));
echo("\n");
#string with number
echo("strtoupper('educative09'): ");
echo (strtoupper('educative09'));
?>

RELATED TAGS

RELATED COURSES

View all Courses

Keep Exploring