Answers for "acf select multiple choice array in loop"

CSS
0

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);
?>
Posted by: Guest on January-12-2022

Browse Popular Code Answers by Language