controlling motors connected to mosfets at the same time.

thanks man, could you possibly give me an example of how i would go about writing this,
for example i want to turn on motors on pin 0 and 2 on at the same time for 4 seconds,

would this be correct?

void setup() {
}

void loop() {
digitalWrite(0, HIGH);
delay(4000);
digitalWrite(0, LOW);
delay(4000);
digitalWrite(2, HIGH);
delay(4000);
digitalWrite(2, LOW);
delay(4000);
}

i know this is basic stuff but im a beginner, go easy please! thanks for your help!! =D