foreach ($groups as $key => &$group) {
$group['check'] = false;
foreach ($gids as $key => $gid) {
if($group['id'] == $gid['gid']) {
$group['check'] = true;
}
PHP的foreach是这样实现的,如果在KOA里不考虑是用forin用reduce()如何实现。
求解。
相关分类