I am trying to build a dynamic selection tool for publications that will have 3 steps:
Step 1 - where user first has to select publication
Step 2 - select volume (there could be more then one volumes in a publication)
Step 3 - select number (multiple numbers per volume)
I try to put results into a drop-down menu, but due to the fact that I use one table where I store entries for each issue, when I get results into a drop-down I do it via foreach loop and results get all row entries and sometimes repeat.
Here are the fields I use:
id
publication parent
volume_number
issue_number
So when I get volume_number of the rows that have the same publication parent I get results as:
<option>1
<option>2
<option>2
<option>3
<option>2
<option>3
Question: How can i show each volume_number just once, even if it appears in the table multiple times?