Trim the search result around the search word
A random thought: put the search string into an array ( with explode). Find the array position of the highlighted string. Count back xx for the start, and forward xx for the end. Extract those array values, then implode them back into a string. That would work for one searchresult word in the string. You’d … Read more