Convert to camelCase

Convert a string to camelCase format with lowercase first letter.

Code

General
lcfirst(str_replace(' ', '', ucwords(preg_replace('/[\s_-]+/', ' ', $str))));

Parameters

The string to convert

Server

More PHP Snippets