I am using in_array
to search in an array if a value exists. My code is below:
$file = 'domains.txt'; //reading txt file
$lines = file($file);//file in to an array
if (in_array("yahoo.com", $lines)) {
echo "Got Domain";
}
However, its not working, it only displays a blank page, but yahoo.com is available in domains.txt so it should return true, but i am stuck with it, please help, thanks.