hi
i'm a php newbie, not sure if anyone can help but it would be greatly appreciated..... i want to load 2 files into arrays (that works) and then use array_diff to create a new array like this:
$words = file ('./words.txt');
$bannedwords = file ('./bannedwords.txt');
$words2 = array_diff ($words, $bannedwords);
but the banned words need to be wildcards e.g. if
$words = ("hello to you", "goodbye to you", "phrase with swearword");
$bannedwords = ("badword", "swearword");
the output produced would be:
$words2 = ("hello to you", "goodbye to you");
i.e. "swearword" would become "%swearword%" in the $bannedwords array.
i am not sure how to do that, can anyone help? Thnaks in advance.
roland