Home  >  Article  >  Backend Development  >  PHP method to convert all strings into uppercase or lowercase, uppercase and lowercase_PHP tutorial

PHP method to convert all strings into uppercase or lowercase, uppercase and lowercase_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:02:45807browse

php method to convert all strings into uppercase or lowercase, uppercase and lowercase

This article describes the example of php method to convert 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

<&#63;php
$string = "Learn PHP string functions at jb51.net";
$lower = strtolower($string);
$upper = strtoupper($string);
print("$lower\n");
print("$upper\n");
print("\n");
&#63;>

The output results are as follows:

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/969505.htmlTechArticleHow to convert all strings into uppercase or lowercase in php. The example in this article describes how to convert all strings in php into uppercase or lowercase. Convert to uppercase or lowercase. Share it with everyone for your reference...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn