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 )