Why are this code not working if i comment out the if statement it prints the file.
<?php
$f = fopen("test.txt", "r");
// Read line by line until end of file
while(!feof($f)) { 
    $arrays = explode("\n",fgets($f));
    foreach($arrays as $words){
        if($words == "andersmarkc"){
            echo $words;
        }
    }
}
fclose($f);
?>
