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



PHP: Tips of the Day

Finding the number of days between two dates

$now = time(); // or your date as well
$your_date = strtotime("2010-01-31");
$datediff = $now - $your_date;

echo round($datediff / (60 * 60 * 24));

Ref : https://bit.ly/2ZDZ4as