How to integrate two for/foreach loops in following scenario?

前端 未结 5 453
忘了有多久
忘了有多久 2021-01-27 06:39

I\'m having two arrays as follows:

$user_ids = Array
(
    [0] => 159a8a6f1c00c5c4d5d0daaab2aa4227
    [1] => a39777761f7816031aec676c80c3a8ad
    [2] =>         


        
5条回答
  •  粉色の甜心
    2021-01-27 07:09

    Refer: http://phpfiddle.org/main/code/8ni-kjz

    while ($match = current($user_status)) {
        if ($match == 'disable') {
            $id = key($user_status);
            objAdminUsers->UpdateUserStatus($user_ids[$id], $user_status[$id]); 
                    $count++;
        }
        next($user_status);
    }
    

提交回复
热议问题