How can i limit a foreach() statement? Say i only want it to run the first 2 'eaches' or something?
You can either use
break;
or
foreach() if ($tmp++ < 2) { }
(the second solution is even worse)