php基础04:字符串函数

Posted

tags:

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

<?php
    
    //1.strlen(),strlen() 函数返回字符串的长度,以字符计。
    echo strlen("hello world");
    echo "<hr>";

    //2.strpos()
    echo strpos("hello world", "world");
    echo "<br>";
    echo strpos("hello world", "hello");
    echo "<hr>";
?>

 

以上是关于php基础04:字符串函数的主要内容,如果未能解决你的问题,请参考以下文章