preg_match array question

From: Date: Fri, 30 May 2003 16:48:28 +0000
Subject: preg_match array question
Groups: php.general 
Request: Send a blank email to php-general+get-149576@lists.php.net to get a copy of this message
Hey, Im trying to use preg_match to validate numbers in multiple fields. I can check one field but Im having trouble checking multiple fields. preg_match ( '(foo)' , $_POST["num1"] ); <- That works fine. but I need to check multiple fields. I thought I would build an array with the POST data like this... $num = array ($_POST["num1"], ($_POST["num2"]); There are more than that... and then use preg_match ('(foo)', $num) ; $num should point to my array, but that doesnt work. I get a warning message.. and it doesnt check the first num1 in the array. Im certain that Its my code, and I wanted to get some input on what Im doing wrong. -Dan

« previous php.general (#149576) next »