i have a table in my database that stores sizes for t-shirt (s,m,l,xl). there is also a field in each table that stores the quantity available for each size. if the quantity is 0 i do not want to display that size shirt as a choice.
how can i create a dropdown that lists only the sizes available, and have it be sorted so that the sizes are displayed in order from smallest to largest (s,m,l,xl)?
for example: say the medium size is not available. the dropdown should look like this (note how the need to be ordered smallest to largest?
------sizes-------
small
large
x-large
please help, it is MUCH appreciated!!