drupal-civicrm/sites/all/modules/civicrm/Civi/CiUtil/Arrays.php
2018-01-14 13:10:16 +00:00

25 lines
323 B
PHP

<?php
namespace Civi\CiUtil;
/**
* Class Arrays
*
* @package Civi\CiUtil
*/
class Arrays {
/**
* @param $arr
* @param $col
*
* @return array
*/
public static function collect($arr, $col) {
$r = array();
foreach ($arr as $k => $item) {
$r[$k] = $item[$col];
}
return $r;
}
}