change text in a string

change the text in a string

<?php
$text = <<<EOD
This is some sample text, we want to make programmershelp appear in bold
EOD;
//before
echo $text;

$word = 'programmershelp';
//after
echo str_replace($word, '<b>' . $word . '</b>', $text);
?>