lilyyan
asked on
suggestion on how to highlight some word in a block of string
Hello,
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,
lilyyan
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,
lilyyan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.