mixed substr_replace ( mixed $string , string $replacement , int $start [, int $length ] )
e.g.
/* These next two replace 'MNRPQR' in $var with 'bob'. */
echo substr_replace($var, 'bob', 10, -1) . "<br />\n";
echo substr_replace($var, 'bob', -7, -1) . "<br />\n";
From the manual
Note, using this I had to use -3 to remove a character and \r\n off a string
Subscribe to this topic in order to receive email notifications of new posts and replies. Select the checkbox in order to subscribe and you will receive an email notification when a new reply/comment is posted. Please note that you will receive an email notification when new reply is posted for this specific topic only.
You can always unsubscribe from receiving notifications by clicking on the unsubscribe link in the notification email message received.