/ Published in: PHP
Turn a string into camelcase. You can optionally set a custom regex delimiter.
Expand |
Embed | Plain Text
{ function camelCase($subject, $delimiters=' _-', $lcfirst=true) { { throw new Exception("Subject must be of type string"); } foreach ($subject as $key => &$word) { } if ($lcfirst) { : } return $subject; } } // "usingPHPTurnThisIntoCamelCASENow"
You need to login to post a comment.
