Is there a function in PHP that takes in a string, a number (i), and a character (x), then replaces the character at position (i) with
i
x
I amazed why no one remember about substr_replace()
substr_replace($str, $x, $i, 1);