@MindzaiMay 22.2009 — #You want to replace all 2s with 1s?
[code=php]$string = "MS8762HN"; $final = str_replace('2', '1', $string);[/code] If not you'll need to be more specific about the rules you want to implement for replacement.
@QuidamMay 23.2009 — #[code=php] // The string $string = "MS8762HN";
// The replacement $replacement = "1";
// The character length of your replacement $length = strlen($replacement);
// The position of the character you want to replace, note that you start counting on 0. You can count backwards aswell. // $position = 5; $position = -3;
// The final string $final = substr_replace($string, $replacement, $position, $length); [/code]