bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Loading option into array

(2 posts)
  • Started 1 year ago by davidbessler
  • Latest reply from mdawaffe
  • This topic is not a support question

No tags yet.

  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?

    Posted 1 year ago #
  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.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.