strtolower(): to change all upper case chars to lower case

Convert ASCII letters to lowercase

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 2026

Start 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);

DEMO

Output :

Example 1: Converting Mixed Case String

<?php
$str = "HELLO World!";
echo strtolower($str);  // Output: hello world!
?>

Example 2: Handling String with Numbers

<?php
$str = "PHP 101: Programming";
echo strtolower($str);  // Output: php 101: programming
?>

Example 3: Converting a Sentence with Mixed Characters

<?php
$str = "PHP is Fun, but ALSO CHALLENGING!";
echo strtolower($str);  // Output: php is fun, but also challenging!
?>

Example 4: Converting a Multi-Line String

<?php
$str = "This is LINE 1\nTHIS IS LINE 2\n";
echo strtolower($str);  // Output: this is line 1\nthis is line 2\n
?>

String Functions first letter of every word to capitalize by using ucwords Change all alphabetic chars to Upper case Checking all lower case or upper case chars in a string


Subscribe to our YouTube Channel here



plus2net.com







fahim

01-01-2013

good code




PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer