<?php $haystack = 'this is a test'; $newstr = substr_replace ($haystack, 'sad', 6, 5); echo "$newstr\n"; ?>