Skip to content

Instantly share code, notes, and snippets.

@steppefox
Created November 1, 2013 05:21
Show Gist options
  • Save steppefox/7261251 to your computer and use it in GitHub Desktop.
Save steppefox/7261251 to your computer and use it in GitHub Desktop.
PHP snippet for lowing word with first big character
public function lowThatWord( $word )
{
return mb_strtoupper( mb_substr( $word, 0, 1, 'UTF-8' ), 'UTF-8' ).mb_strtolower( mb_substr( $word, 1, mb_strlen( $word, 'UTF-8' ), 'UTF-8' ), 'UTF-8' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment