You are here

function wf_crm_array2str in Webform CiviCRM Integration 7.3

Same name and namespace in other branches
  1. 7.5 includes/utils.inc \wf_crm_array2str()
  2. 7.4 includes/utils.inc \wf_crm_array2str()

Convert an array into a | separated string

Parameters

array $arr: Array of select options

Return value

string String representation of key => value select options

4 calls to wf_crm_array2str()
webform_civicrm_update_7300 in ./webform_civicrm.install
Note: There are differences in how contact references and relationships work in the 3.x branch. Read the upgrade instructions at http://drupal.org/node/1615380
wf_crm_field_options in ./webform_civicrm_utils.inc
Get options for a specific field
wf_crm_fill_form in ./webform_civicrm_forms.inc
Recursively walk through form array and set properties of CiviCRM fields Called by _wf_crm_frontend_form_alter() when webform is being viewed
wf_crm_process_options_selection in ./webform_civicrm_admin.inc
Drupal FAPI form submit callback Custom Processing for CiviCRM webform component option lists

File

./webform_civicrm_utils.inc, line 1240
Webform CiviCRM module's common utility functions.

Code

function wf_crm_array2str($arr) {
  $str = '';
  foreach ($arr as $k => $v) {
    $str .= ($str ? "\n" : '') . $k . '|' . $v;
  }
  return $str;
}