I'm reading from a flat file, a user log file I need to compare the log file from the user logging in if the username exists on the log then he will be warned that the name exits.
It seems that "\n" is getting in the away. this is the code:
$myfilename = "userlog.txt";
// checking if the user exist
$content = file($myfilename);
for($v=0; $v <= sizeof($content); $v++) {
if ($user == $content[$v]) {
echo "Nick Already Used!";
}