时间:2021-07-01 10:21:17 帮助过:15人阅读
//插入一段字符串
function str_insert($str, $i, $substr)
{
for($j=0; $j<$i; $j++){
$startstr .= $str[$j];
}
for ($j=$i; $j$laststr .= $str[$j];
}
$str = ($startstr . $substr . $laststr);
return $str;
}
Popularity: 3%http://www.bkjia.com/PHPjc/321264.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321264.htmlTechArticle 代码如下:
//插入一段字符串 function str_insert($str, $i, $substr) { for($j=0; $j$i; $j++){ $startstr .= $str[$j]; } for ($j=$i; $jstrlen($str); $j++){ $last...