maybe tring this ...
$input = array();
reset ($HTTP_POST_VARS);
while ( list($key, $val) = each($HTTP_POST_VARS) ) {
if ( $key != "Submit" ) {
array_push($input, $val);
}
}
Peter
-----Original Message-----
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 3:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP] array_push but with key, value pairs
Hey all,
I was just trying to figure out something that should be quite simple
but seems to be eluding me,
consider the following:
$input = array();
while ( list($key, $val) = each($HTTP_POST_VARS) ) {
if ( $key != "Submit" ) {
array_push($input, $val);
}
}
Ok fine, I now have an associative array with a numeric index, but
hangon I wanted to push the key => value into the array. How would I do
this, I have tried a couple of things but am having some really crazy
results ;-)
What I am really trying to do is create a new array from the
HTTP_POST_VARS while excluding certain fields, like Submit or the X and
Y values from a image button.
Any ideas/suggestions are very welcomed,
Regards
Joseph,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]