Sunday 14 March 2021

php: strtolower: Get the string in lowercase form

Signature:

strtolower ( string $string ) : string

 

Description

Returns a new string with all alphabetic characters converted to lowercase, it will not update the original string.

 

Example

$msg2 = strtolower($msg1);

 

strtolower_demo.php

#!/usr/bin/php

<?php

    $msg1 = "Hello KRISHNA, very good morning!!!!";
    $msg2 = strtolower($msg1);

    echo "msg1 : $msg1\n";
    echo "msg2 : $msg2\n";

?>

 

Output

$./strtolower_demo.php 

msg1 : Hello KRISHNA, very good morning!!!!
msg2 : hello krishna, very good morning!!!!

 

 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment