function webform_civicrm_array2str in Webform CiviCRM Integration 6.2
Same name and namespace in other branches
- 7.2 webform_civicrm_utils.inc \webform_civicrm_array2str()
Convert an array into a | separated string
1 call to webform_civicrm_array2str()
- webform_civicrm_field_options in ./
webform_civicrm_utils.inc - Get options for a specific field @Param $field: Webform component array @Param $context: Where is this being called from? @Param $data: CiviCRM entity data
File
- ./
webform_civicrm_utils.inc, line 989 - Webform CiviCRM module's common utility functions. The code in this file is cross-compatible with D6/Civi3 and D7/Civi4 Drupal-version-specific functions belong in webform_civicrm_dx_functions.inc
Code
function webform_civicrm_array2str($arr) {
$str = '';
foreach ($arr as $k => $v) {
$str .= ($str ? "\n" : '') . $k . '|' . $v;
}
return $str;
}