Permalink
Browse files

Change while loop with foreach for performance

  • Loading branch information...
1 parent 7adafb9 commit 82042f9925edd10e86bd696a9e1b1d6a2907ebce unknown committed Aug 14, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 catalog/includes/modules/boxes/bm_categories.php
@@ -105,8 +105,7 @@ function getData() {
if (tep_not_null($cPath)) {
$new_path = '';
- reset($cPath_array);
- while (list($key, $value) = each($cPath_array)) {
+ foreach($cPath_array as $key => $value) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

0 comments on commit 82042f9

Please sign in to comment.