get_customs()
second parameter returns a collection (optional). Thanks @kas-cor
Usage:
// Second parameter set to true for get_customs returns a collection(array) with `label` and `value`
$array = get_customs('array_name', true);
foreach ( $array as $name ) :
echo $name['label'] . ' - '. $name['value'];
endforeach;