【发布时间】:2018-12-16 12:35:39
【问题描述】:
if ( is_array( $u ) ) {
while( list( $key ) = each( $u ) ) {
$u = $u[$key];
break;
}
}
我的 php 版本是 7.2 当我在 laravel 框架上运行它时,我遇到了这个错误
The each() function is deprecated. This message will be suppressed on further calls
我发现那是我必须将每个更改为 foreach enter link description here
谁能把代码改成我在 php 7.2 上工作,谢谢
【问题讨论】: