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 ) –