You cannot specify multiple strings.  However, you CAN concatenate strings
and perform ereg()/eregi():
   if( eregi("x", $string1.$string2.$string3, $regs )

-----Original Message-----
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 14, 2001 12:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] eregi and ereg??


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
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to