I am trying to rewrite this for loop to remove the deprecated each()
for ($k = 0; (list($os_type, $os_score) = each($os_tab)) && ($k < $BBC_MAXOS); $k++) {
I am using a foreach loop which works except the iteration, I was wondering if there is a better way to iterate thru the loop. $BBC_MAXOS is set to 10 in the config but is not being honored.
foreach ($os_tab as $os_type => $os_score) {
if ($k == 0) {
$k < $BBC_MAXOS;
$k++;
}