php add character after 2 characters code example Example: add character after x characters in php $newstr = substr_replace($oldstr, $str_to_insert, $pos, 0);