Stop PHP from creating arrays in $_POST superglobal
- by cdmckay
PHP will automatically convert
<input type="text" name="foo[0]" value="x" />
<input type="text" name="foo[1]" value="y" />
into
$_POST['foo'] = array(
0 => 'x',
1 => 'y'
);
Which is what you want most of the time. However, in this case I would like this not to happen. Is there anyway to tell PHP to not do this?
I realize I could parse php://input myself, but I'd rather not do that if I can avoid it.
I also don't have the option of renaming the input names.