Foreach Loop :
1. Foreach loop used when you have an array, without array it's not worked.
2. Loop working at the end of array count. For example an array have 5 value then loop run 5 times. For Loop :
1. For loop used according to condition.
2. Loop working at the end of given condition.