Changeset 17575 for branches/comu-ver2/data/class/util/SC_Utils.php
- Timestamp:
- 2008/08/28 14:48:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/util/SC_Utils.php
r17569 r17575 1957 1957 1958 1958 /** 1959 * CSV出力用データ取得 1960 * 1961 * @return string 1962 */ 1963 function getCSVData($array, $arrayIndex) { 1964 for ($i = 0; $i < count($array); $i++){ 1965 // インデックスが設定されている場合 1966 if (is_array($arrayIndex) && 0 < count($arrayIndex)){ 1967 for ($j = 0; $j < count($arrayIndex); $j++ ){ 1968 if ( $j > 0 ) $return .= ","; 1969 $return .= "\""; 1970 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]] )) ."\""; 1971 } 1972 } else { 1973 for ($j = 0; $j < count($array[$i]); $j++ ){ 1974 if ( $j > 0 ) $return .= ","; 1975 $return .= "\""; 1976 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j] )) ."\""; 1977 } 1978 } 1979 $return .= "\n"; 1980 } 1981 return $return; 1982 } 1983 1984 /** 1959 1985 * 配列をテーブルタグで出力する。 1960 1986 *
Note: See TracChangeset
for help on using the changeset viewer.