in_array()wierdness与$ _POST内的数组 [英] in_array() wierdness with arrays inside of $_POST
问题描述
我正在使用in_array()搜索一个值(other),以便验证
a表格。
如果我通过$ _POST [" ;兴趣"]作为搜索PHP的数组说它是一个
无效的数据类型。
这是一个数组,如果我把它复制到另一个变量(即$ list) =
$ _POST [" interest"];)它工作正常。
implode()也是如此。
你认为这是故意还是错误?
-
AJ Zmudosky
没有愚蠢的问题,但是有很多好奇的白痴。
_POST [" interest"]作为搜索PHP的数组说它是一个
无效的数据类型。
这是一个数组,如果我将它复制到另一个变量(即
list =
_POST [" interest"];)它工作正常。
implode()也是如此。
您认为这是故意还是错误?
-
AJ Zmudosky
没有愚蠢的问题,但是有很多好奇的白痴。
I am using in_array() to search for a value ("other"), in order to validate
a form.
If I pass $_POST["interests"] as the array to search PHP says that it is an
invalid datatype.
It is an array and if I copy it to another variable (i.e. $list =
$_POST["interests"];) it works fine.
The same is also true of implode().
Do you believe this is intended or is it a bug?
--
AJ Zmudosky
There are no stupid questions, but there are a LOT of inquisitive idiots.
_POST["interests"] as the array to search PHP says that it is an
invalid datatype.
It is an array and if I copy it to another variable (i.e.
list =
_POST["interests"];) it works fine.
The same is also true of implode().
Do you believe this is intended or is it a bug?
--
AJ Zmudosky
There are no stupid questions, but there are a LOT of inquisitive idiots.
这篇关于in_array()wierdness与$ _POST内的数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!