I want to implement a function which can make some keywords highlighted. For example:
$kerwordArr=("green", "blue", "yellow");
$stringTest ="the sky is blue, the tree is green, green is the color of life, the soil is yellow"
I want the words: green, blue, yellow in the output of the $stringTest can be highlighted in a certain color, i.e. orange
some sample code for implementing the function will be very helpful.
Thanks so much for your suggestion,