
- PHP 7 Tutorial
- PHP 7 - Home
- PHP 7 - Introduction
- PHP 7 - Performance
- PHP 7 - Environment Setup
- PHP 7 - Scalar Type Declarations
- PHP 7 - Return Type Declarations
- PHP 7 - Null Coalescing Operator
- PHP 7 - Spaceship Operator
- PHP 7 - Constant Arrays
- PHP 7 - Anonymous Classes
- PHP 7 - Closure::call()
- PHP 7 - Filtered unserialize()
- PHP 7 - IntlChar
- PHP 7 - CSPRNG
- PHP 7 - Expectations
- PHP 7 - use Statement
- PHP 7 - Error Handling
- PHP 7 - Integer Division
- PHP 7 - Session Options
- PHP 7 - Deprecated Features
- PHP 7 - Removed Extensions & SAPIs
- PHP 7 Useful Resources
- PHP 7 - Quick Guide
- PHP 7 - Useful Resources
- PHP 7 - Discussion
PHP – Make an upper case string using mb_strtoupper()
In PHP, mb_strtoupper() is an inbuilt function that is used to change a given string to upper case.
Syntax
string mb_strtoupper(str $string, str $encoding)
Parameters
mb_strtoupper() accepts two parameters: $string and $encoding.
$string− The string being uppercased.
$encoding− This parameter is the character encoding. If it is absent or null, then the internal character encoding value will be used.
Return Values
string with all alphabetic characters converted to uppercase.
Example
<?php $string = "Hello World!, Welcome to online tutorials"; $string = mb_strtoupper($string); echo $string; ?>
Output
It will convert the given string to upper case.
HELLO WORLD!, WELCOME TO ONLINE TUTORIALS
- Related Articles
- PHP – Make a lower case string using mb_strtolower()
- strtoupper() function in PHP
- How to convert a string into upper case using JavaScript?
- Convert a C++ String to Upper Case
- PHP – Case folding in a string using mb_convert_case()
- How to convert Lower case to Upper Case using C#?
- How to convert Upper case to Lower Case using C#?
- Moving all Upper case letters to the end of the String using Java RegEx
- How to transform List string to upper case in Java?
- C program to convert upper case to lower and vice versa by using string concepts
- Program for converting Alternate characters of a string to Upper Case.\n
- MySQL Query to change lower case to upper case?
- Java program to count upper and lower case characters in a given string
- How to check if a string contains only upper case letters in Python?
- C# program to count upper and lower case characters in a given string

Advertisements