You are here

function socialcalc_save_pairs in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 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 506
SocialCalc manipulation functions Translated from socialcalc-3.js and companion files

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;
}