
- 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 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
- Related Articles
- PHP – Make an upper case string using mb_strtoupper()
- PHP – Case folding in a string using mb_convert_case()
- How to convert a string into the lower case using JavaScript?
- Java String to Lower Case example.
- Convert mixed case string to lower case in JavaScript
- How to convert a string in lower case in Golang?
- Make all column names lower case in MySQL with a single query
- How to convert Lower case to Upper Case using C#?
- How to convert Upper case to Lower Case using C#?
- How to convert std::string to lower case in C++?
- C program to convert upper case to lower and vice versa by using string concepts
- How to check if a string contains only lower case letters in Python?
- C# program to count upper and lower case characters in a given string
- Java program to count upper and lower case characters in a given string
- PHP make sure string has no whitespace?

Advertisements