eregi and ereg??
| From: | Jason Caldwell | Date: | Fri, 14 Sep 2001 05:13:35 +0000 |
| Subject: | eregi and ereg?? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12435@lists.php.net to get a copy of this message | ||
www.php.net shows the proper format for EREG and EREGI is:
int ereg (string pattern, string string [, array regs])
My question is this; I want to be able to compare 2 or more strings to the EREG(I) STRING PATTERN...
without having to create two separate EREG(I) IF...THEN statements...
If I understand the format as displayed above, then I should be able to put multiple variables in
the EREG(I) expression... like so;
if(eregi("x", $string1 $string2 $string3, $regs)
Is this correct? Or, do I have to specify an IF...THEN type of statement for each $STRING ??
Thanks
Jason
jason@thinkingman.org