Home > Backend Development > PHP Tutorial > 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
Release: 2016-07-13 10:02:45
Original
828 people have browsed it

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;>
Copy after login

The output results are as follows:

learn php string functions at jb51.net
LEARN PHP STRING FUNCTIONS AT JB51.NET
Copy after login

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...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template