Replace at the 6th position in the string in PHP
Description
The following code shows how to replace at the 6th position in the string.
Example
<?php
echo substr_replace("Hello world","earth",6);
?>
The code above generates the following result.