Get Categories Products

Dear friends,
I have a question regarding getting products from multiple categories at once.
For example, I am able to get the products in category id 521, through the following code:
$params['cid]=521;
fn_get_products($params);
What can I do in case i want to get products from category IDs 521، 522، 523، 524، 525, etc... the code below won't work:
$params['cid]=521، 522، 523، 524، 525;
fn_get_products($params);
Thank you for your help!

Hello

Please try

$params['cid] = array(521، 522، 523، 524، 525);

Best regards

Robert

Hello

Please try

$params['cid] = array(521، 522، 523، 524، 525);

Best regards

Robert

hi my friend thanks, this code not worked!

$params['cid'] = array(521، 522، 523، 524، 525);

Use

$params['cid'] = array(
    521,
    522,
    523,
    524,
    525
);

Hello

If you change it to hook, don't forget to give & before the $params function parameter.

&$params

Best regards

Robert

Use

$params['cid'] = array(
    521,
    522,
    523,
    524,
    525
);

Thank you so much for the help, I got the answer. Thank you :wub:


Hello

If you change it to hook, don't forget to give & before the $params function parameter.

&$params

Best regards

Robert

Thank you my friend

Hello

You are welcome :)

Best regards

Robert