S
S
Sinner32016-09-07 13:59:40
PHP
Sinner3, 2016-09-07 13:59:40

How to filter by several parameters of one $arrFilter infoblock property?

There is a property in the infoblock "product" I need to display in the list of news that have a property equal to 1 or 2 or 3
wrote like this

$arFilter = array("PROPERTY_product"=>"1 | 2 | 3" );

displays only elements where "product" = 1, how to filter correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Shcheglov, 2016-09-07
@Sinner3

$arFilter = array("PROPERTY_product"=>array("1", "2", "3" ));

N
Nikita, 2016-09-07
@Rema1ns

$arFilter = array(
        'LOGIC' => 'OR',
       array("PROPERTY_product" => '1'),
       array("PROPERTY_product" => '2'),
       array("PROPERTY_product" => '3'),
)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question