//Retrieving userswhile ($row = $vbulletin->db->fetch_array($result)){ $userid = $row['userid']; $musername = fetch_musername($userid); //More code}echo '<a href="profile.php?'.$userid.'">'.$musername.'</a>';