note 102076 modified in function.ucfirst by danbrown

From: Date: Wed, 26 Jan 2011 14:09:25 +0000
Subject: note 102076 modified in function.ucfirst by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176334@lists.php.net to get a copy of this message
For those who want a multibyte-compliant ucfirst() without wanting to mess with encodings, this should do the trick: <?php function mb_ucasefirst($str){ $str[0] = mb_strtoupper($str[0]); return $str; } ?> --was-- For those who want a multibyte-compliant ucfirst() without wanting to mess with encodings, this should do the trick: function mb_ucasefirst($str){ $str[0] = mb_strtoupper($str[0]); return $str; } http://php.net/manual/en/function.ucfirst.php

« previous php.notes (#176334) next »