I'm aware string strstr is (string haystack, string needle) and in the past couple months I've noticed that I need to search and match more than two elements, so I am trying to switch over to ereg() or preg_match() without much luck.
// original (works for one)
if (($ref) and (!strstr($ref, $dig))) {
// modified (works for two)
if (!strstr($ref, $dom) and !strstr($ref, $dig)) {
// attempted (doesn’t work for two)
if (ereg("($dig|$dom)", $ref)) {
I've always loathed Regular expressions and I know I'm missing something on the second and third example, but my main focus is getting ereg() or preg_match() to work with this.