php - delete words from array by matching external text file
<p>I have an array and an external file, both contains lots of words. I want to match strings in the array with the entire external file. Then if there are identical words, I want to delete the word from the array.</p>

<p>Much shorten example:</p>

<pre><code> $words = {"apple", "orange", "banana", "grape", "peach"}
</code></pre>

<p>The external text file is a pure list of words </p>

<pre><code>apple
banana
melon
...
</code></pre>

<p>I'd like to delete the words that are in the external file, and finally get this. </p>

<pre><code>$words = {"orange", "grape", "peach"}
</code></pre>

<p>Should I call the external file, slice every line, then save them to another array? Then compare with the source array?
What is the most effective way to compare the array and a text file? 
I'd appreciate your wisdom!</p>
