Home >Backend Development >PHP Problem >How to convert string to lowercase in php
The way PHP converts a string into lowercase is: it can be achieved through the strtolower() function. This function converts a string to lowercase. Function syntax: [strtolower(string)], the specific usage method is [strtolower($string);].
(Recommended tutorial: php tutorial)
Function introduction:
strtolower() function Convert the string to lowercase.
Syntax:
strtolower(string)
Parameter introduction:
string Required parameters. Specifies the string to be converted.
Return value:
Returns the string converted to lowercase.
Code implementation:
<?php $string = "Learn PHP string functions at jb51.net"; $lower = strtolower($string); $upper = strtoupper($string); print("$lower\n"); print("$upper\n"); print("\n"); ?>
The above is the detailed content of How to convert string to lowercase in php. For more information, please follow other related articles on the PHP Chinese website!