PHP字符串大小写操作

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP字符串大小写操作相关的知识,希望对你有一定的参考价值。

  1. <?php
  2. $string = "i like to program in PHP";
  3. $a = strtoupper($string);
  4. $b = strtolower($string);
  5. $c = ucfirst($string);
  6. $d = ucwords($string);
  7. $e = ucwords(strtolower($string));
  8. ?>

以上是关于PHP字符串大小写操作的主要内容,如果未能解决你的问题,请参考以下文章