$i = 0; while (!empty($next)) { $follows = $instagram->getUserFollows($userid, 100, $next); if ($follows->meta->code == 200) { foreach ($follows->data as $item) { $follow[$item->id] = $item->username; } if (isset($follows->pagination->next_cursor)) { $next = $follows->pagination->next_cursor; } else { $next = ''; } } } $next = ''; $followers = $instagram->getUserFollower($userid, 100); $follower = array(); if (is_object($followers)) { if ($followers->meta->code == 200) { foreach ($followers->data as $item) { $follower[$item->id] = $item->username; } if (isset($followers->pagination->next_cursor)) { $next = $followers->pagination->next_cursor; } } } $i = 0; while (!empty($next)) { $followers = $instagram->getUserFollower($userid, 100, $next); if ($followers->meta->code == 200) {