复制你想要的文本


Copy text what you want

我想要一个PHP代码,可以复制文本后的选择文本从字符串

Like string = "hello my name is Nitesh"

我的代码可以复制"hello my name is "后的6个字符。

必须只显示"Nitesh"

您可以使用子字符串函数:

string substr ( string $string , int $start [, int $length ] )

substr($string, 16, 9);

试试这个,

<?php
$string = "hello my name is Nitesh";
echo substr($string, 16, 9);
?>