To limit the number of iterations in a foreach loop in PHP, you can use a simple counter variable and a break statement.