Highlight results with PHP Client

I created a search bar in a PHP file, that searches my ES index (using the ES PHP client) and shows the results back on it. I want to highlight the searched term in the results like this random image I found online:

Here is a part of the code. I can't figure out how to achieve the above functionality.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.