7
I need to iterate several Collections and if I find a condition I should leave more than one iteration loop.
Ex.:
foreach ($order->getItemCollection() as $item) {
foreach ($order->getFreight()->getPackageCollection() as $packs) {
foreach ($packs->getItemCollection() as $packItem) {
if ($item->getSku() == $packItem->getSku()) {
...
break ;
}
}
}
}
How can I do that ?