Forked from kvncrw/gist:0ddcdf44982a8d16642d
Last active
August 29, 2015 14:02
Revisions
-
jimrubenstein revised this gist
Jun 18, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,5 +3,5 @@ $words = explode('_', $metric_info['uid']); array_shift($words); return implode('', array_map('ucfirst', $words)); }; -
jimrubenstein revised this gist
Jun 18, 2014 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ $generateKpiValue = function($metric_info) { $words = explode('_', $metric_info['uid']); array_shift($words); return implode('', array_map(function('ucfirst', $words))); }; -
KCrawley created this gist
Jun 18, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ $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); };