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
https://forums.phpfreaks.com/topic/72433-solved-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.