php7.2以上 廢除了 each()方法,項目中用到的地方會出現如下報錯php
The each() function is deprecated. This message will be suppressed on further calls
解決辦法。很簡單php7
while (list($key, $val) = each($array)) { #code }
改成spa
foreach ($array as $key => $val) { #code }