Home Forums ACF PRO Select field array problem… Reply To: Select field array problem…

  • Hey there!
    Thanks massively for the help, I worked it all out now.

    If this helps, here is my code for anyone else 🙂

    Field name is ‘Location’
    There are a lot of location stored as an array. To display the first one from the array (if there are multiple values) if just one value display that…

    if(get_field('location') == "location");
     $values = get_field('location');
                    if ( is_array($values) ) {
                        echo $values[0];
                    } else {
                    echo "$value";

    Thanks again! ]