Re: Using $HTTP_POST_VARS

From: Date: Fri, 05 Jan 2001 05:40:48 +0000
Subject: Re: Using $HTTP_POST_VARS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32824@lists.php.net to get a copy of this message
Consider : PHP Manual : substr() http://www.php.net/manual/function.substr.php If it (first n chars) matches cans then point it to one array, if it matches sans then send to another ... All this being done in a loop, such as through foreach. Does this make sense? Regards, Philip Olson http://www.cornado.com/ On Thu, 4 Jan 2001, Todd Cary wrote: > $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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32824) next »