newbie needs help please array
Hi,
I have user input from a form that they have selected a month 3 digits.
I have validated to confirm 3 digits and put the value into a var called x
now I created an array called ms with the 12 months in 3 digits.
"jan","feb","mar" etc
how do I search the array to see if the value of x is there?
if it is there I want to say y=1
I have tried:
if (x == ms[]) {y=1;}
I know I am missing something but I am so tired and can no longer think and I feel like an idiot.
Thanks for your help
|