
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Make Upper Case String Using mb_strtoupper in PHP
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