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
 
PHP – Make a lower case string using mb_strtolower()
In PHP, we can use the function mb_strtolower() to change a given string into lower case. It returns strings with all alphabetic characters converted to lowercase characters.
Syntax
string mb_strtolower(str $string, str $encoding)
Parameters
mb_strtolower() accepts two parameters: $string and $encoding.
$string− The string being lowercased, returns strings with all alphabetic characters converted to lowercase characters.
$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 lowercase.
Example
<?php // Upper and lower case characters are used to // convert in lower case using mb_strtoloower function $string = "Hello World!, Welcome to ONLINE tutorials"; // It gives the output in lower case $string = mb_strtolower($string); echo $string; ?>
Output
It will conver all the characters in the given string to its lower case.
hello world! welcome to online tutorials
Advertisements