<p>I've got a sections table, and an items table.</p>

<p>The problem is each item may be in one or more sections, so a simple 'section_id' for each item won't work, and sql doesn't have a way to store arrays where I can do say "WHERE 5 in section_ids"...</p>

<p>I've considered storing the list of ids as a comma separated string, the problem is I see no way to then check if an item is in a given section from the sql query. The only option I see here is to select the entire table, and parse the strings in php. Needless to say that with 1000's of items this isn't a good idea.</p>

<p>Is there a better way to 'link' an item with multiple sections, and be able to easily select all items for a given section id?</p>

You need a third table itemsPerSection with a primary key composed of both itemid and sectionid, this way you can have a N to N relationship and it's very easy to search on.
So:
```
```
Items   -   ItemsPerSection   -   Secion
itemid  <->   itemid
             sectionid        <->   sectionid
```
```