Changeset 17155 for branches/comu-ver2/data/class/util/SC_Utils.php
- Timestamp:
- 2008/03/14 13:58:37 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/util/SC_Utils.php
r17137 r17155 489 489 490 490 // 配列の値をカンマ区切りで返す。 491 function sfGetCommaList($array, $space=true ) {491 function sfGetCommaList($array, $space=true, $arrPop = array()) { 492 492 if (count($array) > 0) { 493 493 $line = ""; 494 494 foreach($array as $val) { 495 if ($space) { 496 $line .= $val . ", "; 497 }else{ 498 $line .= $val . ","; 495 if (!in_array($val, $arrPop)) { 496 if ($space) { 497 $line .= $val . ", "; 498 } else { 499 $line .= $val . ","; 500 } 499 501 } 500 502 } 501 503 if ($space) { 502 504 $line = ereg_replace(", $", "", $line); 503 } else{505 } else { 504 506 $line = ereg_replace(",$", "", $line); 505 507 } 506 508 return $line; 507 } else{509 } else { 508 510 return false; 509 511 }
Note: See TracChangeset
for help on using the changeset viewer.