<?php $word="the"; $replaceWith = "<span class=\"found\">".$word."</span>"; $sentence = "Hello, did you hear the quick brown fox jumped over the lazy dog"; $edited = str_replace($word, $replaceWith, stristr($sentence, $word)); echo $sentence;
You have javascript disabled. You will not be able to edit any code.