Nothing like a good old-fashioned PHP race:
$myString = 'Hello this is my string';
$myVar = 'bottle';
$words = explode(' ', $myString); // split the string into words
$index = rand(0, count($words) - 1); // select a random index
$words[$index] = $myVar; // replace the word at the random position
$myString = implode(' ', $words); // merge the string back together from the words
You could also do this using regular expressions:
$idx = rand(0, str_word_count($myString) - 1);
$myString = preg_replace("/((?:\s*\w+){".$idx."})(?:\s*\w+)(.*)/",
"\${1} $myVar\${2}", $myString);
This skips forward a random number of words and replaces the next word.
You can see this regex in action here. Changing the number inside the curly braces causes the first capture group to consume more words.