Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 用其他字符替换特定位置的特定字符_Php - Fatal编程技术网

Php 用其他字符替换特定位置的特定字符

Php 用其他字符替换特定位置的特定字符,php,Php,如何用其他字符替换特定位置的特定字符 我知道要替换的角色的位置 $filtBuild = "BB10-1_X-4759-566549"; 使用substr\u replace() 您可以使用substr\u replace() 也许你可以用谷歌搜索:“用其他字符替换特定位置的特定字符” $string = "Hello"; $char = "a"; $pos = 1; $str = substr_replace($string,$char,$pos,1); echo $str; // Ha

如何用其他字符替换特定位置的特定字符

我知道要替换的角色的位置

$filtBuild = "BB10-1_X-4759-566549";
使用
substr\u replace()


您可以使用
substr\u replace()

也许你可以用谷歌搜索:“用其他字符替换特定位置的特定字符”
$string = "Hello";
$char = "a";
$pos = 1;
$str = substr_replace($string,$char,$pos,1);

echo $str;  // Hallo
substr_replace ( $filtBuild , $replacement , $start , $length )