Jump to content

[SOLVED] Array help


Aureole

Recommended Posts

Ok I've hit a dilemma I'm wondering if anyone might be able to help me...

 

Basically here's what I'm trying to do...

 

I want to have an input field in my Admin CP when you are creating a Forum where you can input a list of numbers (member ids) seperated by commars, like this:

 

1,6,4,8,2

 

These will be the ids of people who can moderate the Forum and will be stored in the db along with all the other stuff like forum name/description etc.

 

That's easy enough.

 

Now my problem is I need to get that from the db and store it in an array... basically so I can do something like:

 

<?php
if(in_array($_SESSION['mem_id'], $forum_moderator_array)) {
    echo('Congratulations, you are a forum moderator.');
}
?>

How can I go about doing this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.