New to PHP so forgive me if I don't know the nomenclature. Below I set keys to correspond with fields in our CMS along with conditions for pulling results based on those keys.
if (!empty($query->where[1])) {
foreach ($query->where[1]['conditions'] as $key => $value) {
if (strstr($query->where[1]['conditions'][$key]['field'], 'field_data_field_program_type.field_program_type_value')) {
$query->where[1]['conditions'][$key]['field'] = '(field_data_field_program_type.field_program_type_value = :program_type_value AND field_data_field_project_type.field_project_type_value = :activity_project_type)'
. ' OR field_data_field_project_type.field_project_type_value = :tl_project_type';
$query->where[1]['conditions'][$key]['value'] = array(
':program_type_value' => 'Calendar',
':activity_project_type' => ACTIVITY_PROJECT_TYPE,
':tl_project_type' => TL_PROJECT_TYPE,
);
However, now I need an additional value (let's call it 'Test') assigned to 'program_type_value' key, because I need to pull results containing both 'Calendar' and 'Test' . I have tried a few things but can't get anything to work.
':program_type_value' => array('Calendar','Test')
or, in PHP 5.4+
':program_type_value' => ['Calendar','Test']