PHP Code:
echo $myuser['usergroupid'] . '<br />';
$membergroupids = explode(',' $myuser['membergroupids']);
foreach ($membergroupids AS $groupid)
{
echo $groupid . '<br />';
}
Quote:
Originally Posted by Frank H. Shaw
I WILL FROM NOW ON USE THE NEWER FORMAT FOR THE PHP TAGS - WHEN DID THEY CHANGE BY THE WAY?
|
I think you are confusing yourself. The PHP start/end tags <?php and ?> have not changed. However, when posting on the forum, you should use the PHP "BB Code" tags, and put all your code in there, it is easier to work through and read that way. Look at your code in PHP BB code tags:
PHP Code:
global $myuser;
$myuser = array();
$myusers = $vbulletin->db->query_read("SELECT userid, username, usergroupid, membergroupids FROM " . TABLE_PREFIX . "user ORDER BY userid");
while ($myuser = $vbulletin->db->fetch_array($myusers))
{
echo($myuser['userid'] . "<br />");
echo($myuser['username'] . "<br />");
echo($myuser['usergroupid'] . "<br />");
$tags = explode( ',', $myuser['membergroupids'] );
foreach( $tags as $tag ) {
$tag = trim( $tag );
echo $tag . '<br />';
}
}
See how much more readable that is? And how you don't have to scroll through a heap of text to get to the end of your post?