[help] Servo motor control for seqeunce moving

hello,,,
im working on my arm robot project,,

im confused to define how do i have to control the servo motor for sequential moving..

for example ;
i want to control the servo at 30 then 60 then 90 then 120,,

int ={30,60,90,120};
servo.write*;*
i++;
do i have to use array like above or may be there are better programming algoritm for controlling servo??
i appreciate any answer of u guys..
thx for asnwering..

If you want 4 positions an array is a good idea.
An array is defined as

int servoStops[] = {30,60,90,120};

Then you can do

servo.write(servoStops[n]);

where the variable n has a value between 0 and 3 to identify the appropriate element.

Try it and post your code if you have a problem.

...R