Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
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
Advertisements
