Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > The IN operator

The IN operator

There are some other operators that allow for more specific selections. The IN operator selects records based on a list of possible matching values for a field element. This list can either be determined by a comma-separated list of characters, by an array table returned by a tag, or by a tag or tag filter.

  1. <BOUCLEx(TABLES){field IN a,b,c}>
  2. <BOUCLEx(TABLES){field IN #ARRAY{0,a,1,b,2,c}}>
  3. <BOUCLEx(TABLES){field IN (#VAL{a:b:c}|explode{:})}>


The inverse operator !IN selects records that have field values that do not match any of those listed after the operator.

  1. <BOUCLEx(TABLES){field !IN a,b,c}>


Select the images linked to an article:

  1. <BOUCLE_documents(DOCUMENTS){id_article}{extension IN png,jpg,gif}>
  2. - #FICHIER<br />
  3. </BOUCLE_documents>


Select the sections, except for 3 specific ones:

  1. <BOUCLE_sections(RUBRIQUES){id_rubrique !IN 3,4,5}>
  2. - #TITRE<br />
  3. </BOUCLE_sections>


  • Author :
  • Published :
  • Updated : 30/05/10
  • Translations : English, français