foreach($shipuserdata as $tcheck) { $usercheck = explode("|",$tcheck); $usernameprint = '' . $usercheck[0] . ''; $pagecp .= '' . $usernameprint . '  Expand/Collapse'; $shipcalldata = array(); while($shpcldta = $vbulletin->db->fetch_array($shipdata)) { // if($shpcldta[uid] = $usercheck[1]) // { echo 'win'; // } } $pagecp .= ''; }