PHP get array of words from txt file
<p>I have a text file with spam words. I want to have an array filled with those words.
I've tried doing:</p>

<pre><code>$fp = @fopen("../files/spam.txt",'rb');
$words = fgetcsv($fp,100,"\n");
</code></pre>

<p>but it doesn't work (words only has the first letter of the txt file in it first cell).</p>

<p>do you how to do this?</p>

<p>EDIT:
the .txt file looks like this:</p>

<pre><code>yahoo
google
msn
blah
blah
</code></pre>

<p>EDIT:
<strong>I DONT KNOW WHAT IS A CSV FILE! THIS IS A TEXT FILE! I JUST GIVE AN EXAMPLE.</strong></p>

<p>please could some1 help me it looks really easy, i just dont understand.</p>
