Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Forked from kvncrw/gist:0ddcdf44982a8d16642d
Last active August 29, 2015 14:02
Show Gist options
  • Save jimrubenstein/3cdf814369fcea045e48 to your computer and use it in GitHub Desktop.
Save jimrubenstein/3cdf814369fcea045e48 to your computer and use it in GitHub Desktop.
$generateKpiValue = function($metric_info) {
// there's a regexp for this, if you know it, it'd probably be faster
$words = explode('_', str_replace('ga_', '', $metric_info['uid']));
foreach($words as &$word) {
$word = ucfirst($word);
}
return join('', $words);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment