Using $HTTP_POST_VARS

From: Date: Fri, 05 Jan 2001 05:33:29 +0000
Subject: Using $HTTP_POST_VARS
Groups: php.general 
Request: Send a blank email to php-general+get-32822@lists.php.net to get a copy of this message
$HTTP_POST_VARS contains variables like cans_1=a,cans_2=c,cans_3=b *and* sans_1=a,sand_2=d,sans_3=a. I want to take all of the cans_x variables and put them into an array keyed on the 1,2,3. For example, MyArray1 would contain from the above example $MyArray1[1]=>a,$MyArray1[2]=>c,$MyArray1[3]=>b. Then I want to do the same with the sans_x variables. This is so I can compare the values to see if they are the same. For example, does $MyArray1[1]==$MyArray2[1]? Can this be done? Can a wildcard be used to get all variables like "cans_..."? Todd -- Todd Cary Ariste Software todd@aristesoftware.com

« previous php.general (#32822) next »