Hi,
I don't get why my funcion finds the string even if it doesn't exist in textfile:
function name_exists($name) {
$f = fopen($this->path, "r");
//echo $this->path;
while ( $line = fgets($f) ) {
if(strcmp($line,$name == 0)) {
echo 'exists';
fclose($f);
return TRUE; //we found it and can stop the function
}
}
fclose($f);
return FALSE;
}
Can you help me?