Created
September 13, 2014 14:03
-
-
Save rococodogs/0f1bf7eca8d95bf660dd to your computer and use it in GitHub Desktop.
underlines to camelcase
This file contains 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 characters
<?php | |
function underline_to_camel_case($str) { | |
return lcfirst(implode("", array_map(function($e) { | |
return ucfirst($e); | |
}, explode("_", $str)) | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment