Re: Re: $_POST array order

From: Date: Wed, 14 Mar 2007 17:47:42 +0000
Subject: Re: Re: $_POST array order
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-250602@lists.php.net to get a copy of this message
Al wrote: > Why not simply unset() the unwanted value by its key, i.e., the submit > button's name. actually double unset it. to avoid the request array key hack that exists in older versions of php :-) > > Tim wrote: >> Hi, >> >> Quick question regarding $_POST array element order, first the situation: >> >> I am submitting a form with x first fields and the post value returns the >> last element as being the submit button name and value >> >> Is it safe to consider that the last element in the $_POST array will >> ALWAYS >> be the submit element (it is always last in form)? >> I would like to array_pop($_POST) to get rid of that last element for >> various reasons (validation scheme) later on.. >> >> Regards, >> >> Tim >

« previous php.general (#250602) next »