$_POST 包含带字符串的数组,将其绑定到变量

$_POST contains array with string, bind it to variable

$_POST 的 var_dump 给出以下结果:

array(1) {
    ["postID"]=>
        array(1) {
            [0]=>
            string(2) "76"
        }
}

我想将位置 [0] -> "76" 的数据绑定到一个名为 $id 的变量。 正确的处理方法是什么?

提前致谢!

您可以通过以下操作访问此值:

$id = $_POST['postID'][0];