You are here

function advpoll_has_data in Advanced Poll 7.3

Same name and namespace in other branches
  1. 7 includes/advpoll_helper.inc \advpoll_has_data()
  2. 7.2 includes/advpoll_helper.inc \advpoll_has_data()

Convenience function to find value in a nested array.

2 calls to advpoll_has_data()
advpoll_get_data in includes/advpoll_helper.inc
Returns an object with a predictable structure regardless of content type.
advpoll_get_form_data in includes/advpoll_helper.inc
Returns an object with a predictable structure.

File

includes/advpoll_helper.inc, line 95
Advanced Poll Helper Include.

Code

function advpoll_has_data($options, $term) {
  foreach ($options as $option) {
    if ($option['value'] == $term) {
      return TRUE;
    }
  }
  return FALSE;
}