1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ismemberof vs. in_array?

Discussion in 'XenForo Questions and Support' started by James, Mar 2, 2011.

  1. James

    James Well-Known Member

    I've noticed ismemberof is a helper function for checking usergroups, but what makes this beneficial over the PHP function in_array()?

    AFAIK, ismemberof doesn't actually support multiple usergroup checking, so wouldn't it be better practice to use in_array($var, array(values)) instead of multiple ismemberof checks?
  2. Shadab

    Shadab Well-Known Member

    James likes this.

Share This Page