La Vida Loca

Rule Breaker: Where Law ends…. Lack of will power has caused more failure than lack of intelligence or ability!

ucfirst

Posted by Praful on April 25, 2009



ucfirst :: (PHP 4, PHP 5)
     
 
ucfirst — Make a string’s first character uppercase
 
     
  Description  
     
 
string ucfirst ( string $str )

Returns a string with the first character of str capitalized, if that character is alphabetic.

Note that ‘alphabetic’ is determined by the current locale. For instance, in the default “C” locale characters such as umlaut-a (ä) will not be converted.

 
     
 
php quotes:
$foo = ‘hello world!’;
$foo = ucfirst($foo); // Hello world!

$bar = ‘HELLO WORLD!’;
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!

:end quotes

 

2 Responses to “ucfirst”

  1. [...] is the original:  ucfirst « News with Technology….. Tags:calculate, calculate-the-sum, description, integer-or-float, internal, internal-pointer, [...]

  2. [...] Read more from the original source: ucfirst « News with Technology….. [...]

Leave a Reply

You must be logged in to post a comment.