Er, yeah; Winterdragon forgot to write the name of the function. Probably [man]array_search[/man] judging from what is there; problem is that it won't work, though, because the lines in the array have newline characters on the end. You'd need to search for "example\n".
If you have a guarantee that each line in the file won't be more than, say, 1024 bytes, using fopen() to open a file, and fgets() to read successive lines would probably be faster...
$fp=fopen(the file,'r');
$found=false;
while(!feof($fp))
{ $line=rtrim(fgets($fp,1024));
if($line=='example')
{ $found=true; break;
}
}
fclose($fp);
echo $found?"Found":"Not found";