What i need to do is take a string and highlight only certain words. But the words that need highlighting must come from a string that the user inputs. What I have so far:
PHP Code:
<?php
$input = "words to be highlighted"; //The word that need to be highlighted
$words = explode(" ",$input); //Split the words into an array
$string = "i need to have all the words in this string highlighted if they are from the array above"; //The string that needs to be searched for the above words
$search_words = explode(" ",$string); //Split the above string word-by-word
?>
Then I have no idea how to check the arrays against each other. Please help!