RE: [PHP-DB] eregi and ereg??

From: Date: Fri, 14 Sep 2001 12:18:25 +0000
Subject: RE: [PHP-DB] eregi and ereg??
Groups: php.db 
Request: Send a blank email to php-db+get-12447@lists.php.net to get a copy of this message
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:jason@thinkingman.org] Sent: Friday, September 14, 2001 12:14 AM To: php-db@lists.php.net 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 jason@thinkingman.org

« previous php.db (#12447) next »