function findit($gbq, $kwords){
$original_file = file_get_contents($gbq);
$keytar = $kwords;
$ckeytar = strtoupper($keytar);
$okeytar = strtolower($keytar);
$arrit = array(
"original" => $keytar,
"ocap" => $ckeytar,
"olow" => $okeytar,
);
if(strpos($original_file, $arrit['original']) == true) {
$fp = fopen("linkter.html", 'a');
fwrite($fp, "<a href='" . $gbq . "' style='color:orange;'>" . $gbq . "</a>");
fclose($fp);
}
elseif(strpos($original_file, $arrit['ocap']) == true) {
$fp = fopen("linkter.html", 'a');
fwrite($fp, "<a href='" . $gbq . "' style='color:red;'>" . $gbq . "</a>");
fclose($fp);
}
elseif(strpos($original_file, $arrit['olow']) == true) {
$fp = fopen("linkter.html", 'a');
fwrite($fp, "<a href='" . $gbq . "' style='color:green;'>" . $gbq . "</a>");
fclose($fp);
}
else{
echo "String not found";
}
}
For some reason it says there is an empty delimiter in the second conditional (the $arrit['ocap'] one).
I've read some other answers, but I haven't found one that works (or that I think would work)