I'm using this particular code to highlight in color hidden words that are in text
$string = "111111hint111111111111111";
$badwords = array('hint', 'aol', 'yahoo', 'hotmail');
foreach($badwords as $word)
{
$replacement = "<font color=#00FF00><b>".$word."</b></font>";
$string = str_replace($word, $replacement, ($string));
}
echo "$string";
I'm usig this code below, to show me the differences between an old string and a new string.
$old = "111111111111111111111";
$new = "11111 bozo 1111111111111111";
$old2 = explode(' ', $old);
$new2 = explode(' ', $new);
// What is different?
print_r (array_diff($new2, $old2));
I'm having trouble incorporating the two scripts together so I would see the added differences in an array in colored to show where the new chages were added in the old.
Best regards,
Owen The Samoan