PHP method for replacing a certain "index" in a string (like the 3rd character for instance) with another string
<p>Say I hate the word "hat". I want a function that would work something like <code>strreplace("hat", 1, "o")</code> therefore changing it into <code>hot</code> instead of <code>hat</code>.</p>

<p>Is there a way to do this with a function? Or do I have to write my own?</p>
