php转换大小写快捷方法

2024-01-23  本文已影响0人  轻书铭

一、场景一

基础phpstorm开发快捷方法

二、场景二

php代码处理转换
$str = "Hello World";  
$lowerStr = strtolower($str);  
echo $lowerStr;  // 输出:hello world
$str = "Hello World";  
$upperStr = strtoupper($str);  
echo $upperStr;  // 输出:HELLO WORLD
$str = "hello world";  
$ucfirstStr = ucfirst($str);  
echo $ucfirstStr;  // 输出:Hello world
$str = "hello world";  
$ucwordsStr = ucwords($str);  
echo $ucwordsStr;  // 输出:Hello World
上一篇 下一篇

猜你喜欢

热点阅读