diff --git a/catalog/index.php b/catalog/index.php index 298d3b653..dbf7bce38 100644 --- a/catalog/index.php +++ b/catalog/index.php @@ -49,7 +49,8 @@ if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); - for($i=0, $n=sizeof($category_links); $i<$n; $i++) { + $n=sizeof($category_links); + for($i=0;$i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { @@ -111,8 +112,8 @@ } $select_column_list = ''; - - for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { + $n=sizeof($column_list); + for ($i=0; $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, ';