Support

Account

Home › Forums › Front-end Issues › Relationship Meta_value array › Reply To: Relationship Meta_value array

  • Got it! need to foreach the $filter array 🙁

    
     if($programCat){
            // meta filter
            $metaFilter = array('relation' => 'OR');
    
            foreach ($programCat as $program){
                $filter =  array(
                    'key' => 'zorgverlener_programmas',
                    'value' => '"'.$program.'"',
                    'compare' => 'LIKE'
                );
                array_push($metaFilter, $filter);
            }
        }
    

    is there a nicer way to do this?