Support

Account

Home Forums General Issues Comma separated list with & for last value Reply To: Comma separated list with & for last value

  • 
    $value = get_field('departure_airport');
    $last_value = '';
    if (count($value) > 1) {
      $last_value = ' & '.array_pop($value);
    }
    echo implode(', ', $value),$last_value;