Created
June 22, 2017 00:47
-
-
Save sayhicoelho/ee117ec24c2a7cc4e6e09e90903c3fb1 to your computer and use it in GitHub Desktop.
String 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 strtocamel($str, $separator = '_', $replace = true) | |
{ | |
return str_replace($separator, $replace ? '' : $separator, ucwords($str, $separator)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment