Let's say I have data string like this...
one=1&two=2&three=3&four=4&two=2
I'm using php foreach to grab the key/value and sort how I need it at this point
foreach($_POST as $key => $value) {
if ($key == "two") {
// $result = Take $value and add it to the previous $value .",";
}
}
The goal I am trying to reach is how do I take the duplicate keys and add the previous value generated in the loop. For example: The solution would be $result = 2,2,
POSTed that to your server, you'd only see onetwo, you would not see both values.