php怎么将字母全部转换为大写-LMLPHP

PHP中可以使用strtoupper()函数将字符串中所有字符转换为大写。

函数语法:

strtoupper(string)
登录后复制

string:必需。规定要转换的字符串。

示例:

<!DOCTYPE html>
<html>
<body>
<?php
echo strtoupper("Hello WORLD!");
?> 
 
</body>
</html>
登录后复制

效果如下:

php怎么将字母全部转换为大写-LMLPHP

更多相关教程请关注Work网

以上就是php怎么将字母全部转换为大写的详细内容,更多请关注Work网其它相关文章!

08-25 03:47