Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // $foo is de zin en $array is de array met keyvalues
- function explodeSentence($foo, $array) {
- $sntc = "";
- strtolower($foo);
- $str = explode(" ", $foo);
- foreach($str as $word) {
- if($array[$word] > 1) {
- $sntc .= "<span style='background-color: yellow;'>$word</span> ";
- } else {
- $sntc .= $word;
- }
- }
- return $sntc;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement