strtolower() converts ASCII A-Z to lowercase. In current PHP this conversion is locale-independent; use mb_strtolower() when non-ASCII Unicode letters also need case conversion.
$value = 'PHP Tutorial 2026';
echo strtolower($value); // php tutorial 2026Start with this current pattern. The examples below are retained, corrected where necessary, and expanded for additional variations and output.
$my_str="Hello welcome to plus2net.com";
$my_str=strtolower($my_str);
echo $my_str;
Above code output will be
hello welcome to plus2net.com
Syntax
$val=strtolower($input_sting);
<?php
$str = "HELLO World!";
echo strtolower($str); // Output: hello world!
?>
<?php
$str = "PHP 101: Programming";
echo strtolower($str); // Output: php 101: programming
?>
<?php
$str = "PHP is Fun, but ALSO CHALLENGING!";
echo strtolower($str); // Output: php is fun, but also challenging!
?>
<?php
$str = "This is LINE 1\nTHIS IS LINE 2\n";
echo strtolower($str); // Output: this is line 1\nthis is line 2\n
?>
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| fahim | 01-01-2013 |
| good code | |