Transform.php
public static function shortenAndCapitalize($string)
    {
        $result = '';
        $parts = explode(' ', trim($string));

        foreach ($parts as $part) {
            $result = $result.strtoupper(mb_substr($part, 0, 1));
        }

        return $result;
    }
public static function shortenAndCapitalize($string)
    {
        $result = '';
        $parts = explode(' ', trim($string));

        foreach ($parts as $part) {
            $result = $result.strtoupper(mb_substr($part, 0, 1));
        }

        return $result;
    }
public static function shortenAndCapitalize ( $ string ) { $ result = '' ; $ parts = explode ( ' ' , trim ( $ string ) ) ; foreach ( $ parts as $ part ) { $ result = $ result . strtoupper ( mb_substr ( $ part , 0 , 1 ) ) ; } return $ result ; }
Shorten a string ant transform into capitals 'john van helsing' will be JVH
@param $string $string
@return string
Shorten a string ant transform into capitals john van helsing will be JVH