Here is a simple example of nested for loop. This script breaks out of both loops if var1 equals 2 and ...
www.tutorialspoint.com