<?php
openside("");
$w = dbquery("SELECT * FROM ".$db_prefix."users where user_id='".$userdata['user_id']."'");
if (dbrows($w)) {
$d = dbarray($w);
}
$a = (strpos($d['user_groups'], ".") == 0 ? explode(".", substr($d['user_groups'], 1)) : explode(".", $d['user_groups']));
for ($i = 0;$i < count($a);$i++) {
echo "<a href='profile.php?group_id=".$user_groups[$i]."'>".getgroupname($a[$i])."</a><br>";
}
closeside();
?>