Copy code The code is as follows:
//Insert a string
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.htmlTechArticleCopy the code The code is as follows: //Insert a string function str_insert($str, $i, $substr) { for($j=0; $j$i; $j++){ $startstr .= $str[$j]; } for ($j=$i; $jstrlen($str); $j++){ $last. ..