Ignore:
Timestamp:
2012/06/21 15:02:41 (12 years ago)
Author:
pineray
Message:

#1859
foreach でキーしか使わない場合に array_keys で配列を作ってから渡す方法だと、
メモリを倍ほど消費することがわかったので、見苦しいけれど不要なバリューを生成する方向に.
F*in' PHP!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_Product.php

    r21931 r21935  
    548548     */ 
    549549    function setPriceTaxTo($arrProducts) { 
    550         foreach (array_keys($arrProducts) as $key) { 
     550        foreach ($arrProducts as $key => $value) { 
    551551            $arrProducts[$key]['price01_min_format'] = number_format($arrProducts[$key]['price01_min']); 
    552552            $arrProducts[$key]['price01_max_format'] = number_format($arrProducts[$key]['price01_max']); 
Note: See TracChangeset for help on using the changeset viewer.