Topic: Explanation about punbb Code

Hi,

Does someone can explain me in human (comprehensive) language wha t do the followings lines extract from profile.php (punbb version 1.2.1 around line 550)

$cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array();
    // If the user should have moderator access (and he/she doesn't already have it)
    if (in_array($cur_forum['id'], $moderator_in) && !in_array($id, $cur_moderators))
        {
            $cur_moderators[$username] = $id;
            ksort($cur_moderators);

            $db->query('UPDATE '.$db->prefix.'forums SET moderators=\''.$db->escape(serialize($cur_moderators)).'\' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $db->error());
        }

I would like to do something similar :

$cur_subscribers = ($cur_subscribe['subscribe']);
        // If the user should have moderator access (and he/she doesn't already have it)
        if (in_array($cur_subscribe['fid'], $subscribe_in)  && !in_array($id, $cur_subscribers))
        {
            $cur_subscribers[$username] = $id;
            ksort($cur_subscribers);

            $db->query('INSERT INTO '.$db->prefix.'subscribe VALUES ('.$id.','.$cur_subscribe['fid'].')') or error('Unable to insert subscribers', __FILE__, __LINE__, $db->error());
        }

from now is not working of course and i'm pretty sure than this line is the problem

$cur_subscribers = ($cur_subscribe['subscribe']);

Any assistance will be highly appreciated