I want to have a drop down the contains the quantity in such a way that if the number of products in stock is 45 then the drop down will show counting from 1-45 in drop down and if suppose 5 products are sold out then the drop down will show 1-40
how this is possible
on your PHP you would query the database to findout how many products are left in stock.
for example:
then on your php you can do something like