I want to optimize this code block so that it breaks out of the inner loop when stristr() is true.
Here is what I currently have:
foreach ($aData as $key => $row) {
$iFound = false;
foreach($row as $cell) {
foreach ($aSearch as $sTerm) {
if (stristr($cell, $sTerm)) { $iFound = true; }
}
}
if ($iFound == false) { unset($aData[$key]); }
}
Is this possible within a foreach loop?
TIA