Support

Account

Home Forums Front-end Issues ACF Relationship – Loop, highest selected option Reply To: ACF Relationship – Loop, highest selected option

  • the number of bedrooms is the array index, array_search() searches the values which in your case is the number of times it was selected. If you looking for the most times or least times selected then you search the values. If you want to know the highest lowest selected you’d need to search the keys.

    
    $lowest_selected = min(array_keys($bedroom_count))