- implode: documentation ( source)
- explode: documentation ( source)
- array_walk: documentation ( source)
- ucfirst: documentation ( source)
<?php
function mediaapi_filter_underscoretocamelcase($string)
{
$string = explode('_', $string);
array_walk($string, function ($item, $key) {
print $key;
$item = ucfirst($item);
});
return implode('', $string);
}
echo mediaapi_filter_underscoretocamelcase('franz_deleon');