0
如何删除此警告?通过参考变量警告结束()
严格的标准:只有变量应该按引用传递在
我有一些代码从一个多维数组获得独特的值,然后得到最后一个索引。
$catchColors[]= array();
for ($i = 0; $i < $totalRows; $i++) {
$catchColors[$i] = $postData[$i]['ColorID'];
}
$result = array_unique($catchColors);
print_r($result);
print end(array_keys($result));
它仍然返回值,但是如何删除警告?
不应该是'$ catchColors = array();'? –
error_reporting或@ – steve
[严格标准:只有变量应该通过引用传递]的可能重复(http://stackoverflow.com/questions/2354609/strict-standards-only-variables-should-be-passed-by-reference ) –