|
Posted by Max on 10/10/05 11:24
Is there a way to separate text in an ereg statement so that it is checked
against separately?
In other words, I've got the following:
$domains = "domain1.com domain2.com domain3.com";
if (ereg($domains, $variable)) do whatever...
Is there any separator that I can place in between the various domains, so
that the ereg statement will check if any of the domains is in $variable? As
is, it checks the entire string with the spaces.
I know I can explode $domains, and have multiple ereg checks in the
statement like if ereg($domains[0],$variable) || ereg($domains[1])...etc,
but I'm looking to avoid this so I can have an infinite number of domains.
Is this possible?
Thanks,
Max
Navigation:
[Reply to this message]
|