  |
38 | 38 | | tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set global_product_notifications = '" . (int)$product_global . "' where customers_info_id = '" . (int)$customer_id . "'"); |
| |
39 | 39 | | } elseif (sizeof($products) > 0) { |
| |
40 | 40 | | $products_parsed = array(); |
  |
41 | | - | for ($i=0, $n=sizeof($products); $i<$n; $i++) { |
| |
42 | | - | if (is_numeric($products[$i])) { |
| |
43 | | - | $products_parsed[] = $products[$i]; |
| |
| 41 | + | reset($products); |
| |
| 42 | + | while (list(, $value) = each($products)) { |
| |
| 43 | + | if (is_numeric($value)) { |
| |
| 44 | + | $products_parsed[] = $value; |
  |
44 | 45 | | } |
| |
45 | 46 | | } |
| |
46 | 47 | | |