Forums

Join
bbPress Support ForumsPluginsLoading option into array

Info

Tags

Loading option into array

  1. So I have stored an option called forum_restriction_db. It has the value of:
    "1" => "David Bessler,testman", "3" => "David Bessler",

    When I try to assign that array to a varaiable as follows:
    $forum_restriction_allowed_in_forum = array(bb_get_option('forum_restriction_db'));

    It tells me the value of $forum_restriction_allowed_in_forum is just array.

    I tried setting the value of the option forum_restriction_db to array("1" => "David Bessler,testman", "3" => "David Bessler",)

    but then it spits back the members of the array as a,r,r,a,y etc ... so the allowed memebrs of the forum_id 3 is "r".

    How can I get this to work?

  2. bb_update_option( 'forum_restriction_db', array( "1" => "David Bessler,testman", "3" => "David Bessler" ) );
    $value = bb_get_option( 'forum_restriction_db' );

    That's how it should work.

  3. You must log in to post.