主页
PHP
PHP substr() 函数
tryphp_func_string_substr3
运行 ❯
×
更改方向
保存代码
更改主题
<?php // Positive numbers: echo substr("Hello world",0,10)."
"; echo substr("Hello world",1,8)."
"; echo substr("Hello world",0,5)."
"; echo substr("Hello world",6,6)."
"; echo "
"; // Negative numbers: echo substr("Hello world",0,-1)."
"; echo substr("Hello world",-10,-2)."
"; echo substr("Hello world",0,-6)."
"; ?>