RE: [PHP] preg_match array as subject

From: Date: Wed, 16 Apr 2003 15:38:17 +0000
Subject: RE: [PHP] preg_match array as subject
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144134@lists.php.net to get a copy of this message
int preg_match ( string pattern, string subject [, array matches [, int flags]]) you can see that preg_match takes strings, not mixed or arrays... you could easily write your own little function though to do what you want...shouldn't take more than a couple minutes... jack > -----Original Message----- > From: daniel [mailto:daniel@electroteque.org] > Sent: Wednesday, April 16, 2003 3:38 AM > To: php-general > Subject: [PHP] preg_match array as subject > > > hi guys this is really tedious one, can preg_match use an array > as its subject > ? > > //if (in_array($country,$countries)) { > // die($country); > //} > > in_array seems to only get exact matches and sometimes not even a > match when > it should > if (preg_match("/\\\$country/i",$countries)) { > die($country); > } > > can i do it like this ? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#144134) next »