cuonghuynh
5/22/2018 - 10:08 AM

Camelize a string

Camelize a string

<?
protected function camelize($scored)
{
    return lcfirst(
        implode(
            '',
            array_map(
                'ucfirst',
                array_map(
                    'strtolower',
                    explode('_', $scored)
                )
            )
        )
    );
}