Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

acf select multiple choice array in loop

<?php 
      $labels = array();
      $field = get_field_object('fruit');
      $values = get_field('fruit');
      foreach ($values as $value) {
      $labels[] = $field['choices'][ $value ];}

      echo implode(', ', $labels);
?>
Source by support.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #acf #select #multiple #choice #array #loop
ADD COMMENT
Topic
Name
2+9 =