$usernames = array(); $nicknames = array(); for ($j = 0; $j < MAX_GROUP_NUM; $j++) { if ($i * MAX_GROUP_NUM + $j >= $memberCount) { break; } $member = $memberList[$i + MAX_GROUP_NUM + $j]; $usernames[] = $member['UserName']; $nicknames[] = $member['NickName']; } //TODO if ($chatRoomName == '') { $chatRoomName = $weChat->createChatRoom($usernames); } else { $weChat->addMember($chatRoomName, $usernames); } $weChat->deleteMember($chatRoomName, $usernames); } echo '<br/>---------------:当前删除你的好友列表如下:---------------<br/>'; $deleteList = $weChat->getDeleteList(); $resultNames = ''; if (empty($deleteList)) { echo '没有任何人删除了你.'; return; } foreach ($memberList as $key => $member) { if (in_array($deleteList, $member['UserName'])) { $resultNames .= '|' . $member['NickName']; } } echo $resultNames . '<br/>';