public static function camelCaseFromUnderscore($strName)
    {
        $strToReturn = '';

        // If entire underscore string is all uppercase, force to all lowercase
        // (mixed case and all lowercase can remain as is)
        if ($strName == strtoupper($strName)) {
            $strName = strtolower($strName);
        }

        while (($intPosition = strpos($strName, "_")) !== false) {
            // Use 'ucfirst' to create camelcasing
            $strName = ucfirst($strName);
            if ($intPosition == 0) {
                $strName = substr($strName, 1);
            } else {
                $strToReturn .= substr($strName, 0, $intPosition);
                $strName = substr($strName, $intPosition + 1);
            }
        }

        $strToReturn .= ucfirst($strName);
        return $strToReturn;
    }
public static function camelCaseFromUnderscore($strName)
    {
        $strToReturn = '';

        // If entire underscore string is all uppercase, force to all lowercase
        // (mixed case and all lowercase can remain as is)
        if ($strName == strtoupper($strName)) {
            $strName = strtolower($strName);
        }

        while (($intPosition = strpos($strName, "_")) !== false) {
            // Use 'ucfirst' to create camelcasing
            $strName = ucfirst($strName);
            if ($intPosition == 0) {
                $strName = substr($strName, 1);
            } else {
                $strToReturn .= substr($strName, 0, $intPosition);
                $strName = substr($strName, $intPosition + 1);
            }
        }

        $strToReturn .= ucfirst($strName);
        return $strToReturn;
    }
public static function camelCaseFromUnderscore ( $ strName ) { $ strToReturn = '' ; // If entire underscore string is all uppercase, force to all lowercase // (mixed case and all lowercase can remain as is) if ( $ strName == strtoupper ( $ strName ) ) { $ strName = strtolower ( $ strName ) ; } while ( ( $ intPosition = strpos ( $ strName , "_" ) ) !== false ) { // Use 'ucfirst' to create camelcasing $ strName = ucfirst ( $ strName ) ; if ( $ intPosition == 0 ) { $ strName = substr ( $ strName , 1 ) ; } else { $ strToReturn .= substr ( $ strName , 0 , $ intPosition ) ; $ strName = substr ( $ strName , $ intPosition + 1 ) ; } } $ strToReturn .= ucfirst ( $ strName ) ; return $ strToReturn ; }
Converts a underscored word into a CamelCased word

@param string $strName String to be converted

@return string The resulting camel-cased word
@was QConvertNotation::CamelCaseFromUnderscore
Converts a underscored word into a CamelCased word