if ( is_array( $u ) ) {
while( list( $key ) = each( $u ) ) {
$u = $u[$key];
break;
}
}
and my php version is 7.2 when i run it on laravel framwork i gat this error
The each() function is deprecated. This message will be suppressed on further calls
i found thats i have to change each to foreach enter link description here
cound any one change the code to me to work on php 7.2 thanks