How do I write multiple variable syntax?

I am trying to write a script that will do a sql statement. But in the sql I will have a list (1,2,3,4).

How would I go about asking for the input from the user running the script, and then transferring that back into the list as say ($var1,$var2,$var3)?

It would be somewhat like this:

Enter numbers:
1,2,3,4,5,6,7,8 (I need these numbers to be the variables)

Select *
from person
where nbr in ($var1,$var2,$var3,$var4);

Any and all help is greatly appreciated! Have a good day!:confused:

IF you always want a linear query use the between operator
where a between b and c

select stuf from mytable where cnt between 2 and 7;