php怎么把英文全部转成小写

php怎么把英文全部转成小写,但是需求要把英文全部转为小写,在php里面用什么函数处理这个问题呢?

<?php 
$foo = 'hello world!'; 
$foo = ucwords($foo);       // Hello World! 
  
$bar = 'HELLO WORLD!'; 
$bar = ucwords($bar);       // HELLO WORLD! 
$bar = ucwords(strtolower($bar)); // Hello World! 
?>

这样就把字母全部转为小写了。

共享资源网提供最优质的资源集合。
共享资源网 » php怎么把英文全部转成小写

发表评论

共享资源网提供最优质的资源集合

充值中心 开启会员