1 2 3 4 5 6 7 8 9
<?php $text = "hello world this is a string"; $text = substr_replace($text, '', 10, 1); echo $text . "\n"; $text = "hello world this is a string"; $text = str_replace(substr($text, 9, 1), substr($text, 7, 1), $text); echo $text . "\n";
1 2
hello worl this is a string heooo worod this is a string