How to convert all strings to uppercase or lowercase in php
This article mainly introduces the method of converting all strings to uppercase or lowercase in php, involving strtolower in php For tips on using functions such as strtoupper, friends in need can refer to it
The example in this article describes how PHP converts all strings into uppercase or lowercase. Share it with everyone for your reference. The specific analysis is as follows:
In PHP, you can use the strtolower and strtoupper functions to convert all English characters in the string to lowercase or uppercase
?
1
2
3
4
5
6
7
8
|
$string = "Learn PHP string functions at jb51.net";
$lower = strtolower($string);
$upper = strtoupper($string);
print("$lowern");
print("$uppern");
print("n");
?>
|
1
2
3
4
5
6
1
2
|
learn php string functions at jb51.net
LEARN PHP STRING FUNCTIONS AT JB51.NET
|
7
8
|
$string = "Learn PHP string functions at jb51.net";
$lower = strtolower($string);
$upper = strtoupper($string);
print("$lowern");
print("$uppern");
print("n");
?>
|
?
1
2
|
learn php string functions at jb51.net
LEARN PHP STRING FUNCTIONS AT JB51.NET
|
I hope this article will be helpful to everyone’s PHP programming design.
http://www.bkjia.com/PHPjc/969350.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/969350.htmlTechArticleHow to convert all strings into uppercase or lowercase in php. This article mainly introduces how to convert all strings in php The method of converting into uppercase or lowercase involves functions such as strtolower and strtoupper in php...