You are here

function socialcalc_save_pairs in Sheetnode 7.2

Same name and namespace in other branches
  1. 6 socialcalc.inc \socialcalc_save_pairs()
  2. 7 socialcalc.inc \socialcalc_save_pairs()
1 call to socialcalc_save_pairs()
socialcalc_save_edit in ./socialcalc.inc

File

./socialcalc.inc, line 616
SocialCalc manipulation functions.

Code

function socialcalc_save_pairs($values) {
  $result = '';
  if (!empty($values)) {
    foreach ($values as $key => $value) {
      $result .= $key . ":";
      if (is_array($value)) {
        $result .= implode(":", $value);
      }
      else {
        $result .= $value;
      }
      $result .= "\n";
    }
  }
  return $result;
}