026-PHP常用字符串函数(三)

<?php
    //颠倒字串
    print("abcdefg  颠倒  ");
    print(strrev("abcdefg")."<hr>");

    //小写字串
    print("小写: ".strtolower("Hello World")."<hr>");

    //大写字串
    print("大写: ".strtoupper("Hello World")."<hr>");

    //去空格
    $text = "     whitespace      ";
    print("\"" . trim($text) . "\"");
?>

 

posted @ 2019-06-07 12:55  像一棵海草海草海草  阅读(102)  评论(0编辑  收藏  举报