I am working with the following for loop:
for (int intPrjName = 0; intPrjName < [arrPrjName count]; intPrjName++)
I have a if/else stat
Your problem is a general programing problem. The simplest way is to just use a BOOL flag.
BOOL alertShown = NO;
for (int intPrjName = 0; intPrjName < [arrPrjName count]; intPrjName++) {
if (something) {
// . . .
} else {
if (!alertShown) {
[self showAlert:intPrjName]; // Or something
alertShown = YES;
}
}
}