Get the App
SLTechnology News&Howtos  ›  Development  › 

How to convert English to lowercase by php

Shulou Source: shulou.com Published: 2022-06-03 13:53:56 10月02日 Update

This article mainly introduces how to convert English to lowercase by php. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Php to achieve lowercase English methods: 1, use the lcfirst () function to make the first letter of the first English word lowercase; 2, through the strtolower () function to make all letters lowercase.

This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer

How to convert English to lowercase with php?

The first word is lowercase: lcfirst ()

The code is as follows:

All letters are lowercase: strtolower ()

The strtolower () function converts the string to lowercase, and the syntax is "strtolower (string)".

Note: this function is binary safe.

Related introduction:

The first letter of each word is converted to uppercase: ucwords ()

The code is as follows:

The first letter of the first word is capitalized: ucfirst ()

The code is as follows:

All letters are capitalized: strtoupper ()

The above is all the contents of the article "how to convert English to lowercase in php". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Lowercase letters English functions words code uppercase content articles security binaries values interests characters strings boys buddies methods more comments Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info OPPO Reno Huawei NVidia MariaDB