The variable:
$products_in_cart = '112,109,106';
The query_posts:
query_posts(array(
'post_type' => 'product',
'post__not_in' => array($products_in_cart),
...
If I replace in the query $products_in_cart by 112,109,106 it work.
The variable is ok outside the loop, can’t understand what is wrong with this basic use, thanks for your help.
array(112,96,80)isArray( [0] => 112 [1] => 96 [2] => 80), andarray('112,96,80')isArray( [0] => 112,96,80), so when you put it like a string it sees the value as a string, instead of each value being separate (due to quotes).