I have the following loop:
foreach($_POST as $key => $value) {
echo "Key:" . $key . " Value: ". $value . "<br />";
}
which produce the following result:
Key:1 Value: my value Key:8 Value: my some other value Key:9 Value: another value
What I am trying to do is to create an array that would look like this:
$editWhat = array(
'field1' => $key1,
'field2' => $key2,
'field3' => $key3,
'field4' => $value1,
'field5' => $value2,
'field6' => $value3
);
Comma should be stripped in the last value pair line in the array, which cause me additional problems.
Any help will be deeply appreciated.
Regards, John