drupal-civicrm/sites/all/modules/civicrm/Civi/CiUtil/Arrays.php

25 lines
323 B
PHP
Raw Normal View History

2018-01-14 15:10:16 +02:00
<?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;
}
}