daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Jan 17th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $field_items = field_get_items($entity_type, $entity, 'field_new_hours');
  2.  
  3. $total = 0;
  4. foreach ($field_items as $item) {
  5. $total += $item['value'];
  6. }
  7.  
  8. $entity_field[0]['value'] = $total;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top