TELL A FRIEND
|
contact
|
ADVERTISE
|
>>
Earn money through freelance projects!
Home
Tech Channels
Tutorials
Resource Directory
Source Code
Discussions
Q & A
Submit
RESOURCES
Source Code (463 )
Articles (119)
Books (3)
Components (25)
News (1 )
Websites (29)
Related Tutorials
Javascript Tutorial
PHP Tutorial
Learn AJAX Tutorial
HTML tutorial
Flex Tutorial
...more
Community
Join VisualBuilder
Authors
People
Discussions
Site
About Us
Site Map
Search
Contact Us
Feedback
Tell a Friend
Advertise
You are Here:
Home
>
PHP
>
Source Code
>
Strings
Make A String's First Character Uppercase
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
$foo
=
'hello world!'
;
$foo
=
ucfirst
(
$foo
)
;
// Hello world!
echo
$foo
.
"n"
;
$bar
=
'HELLO WORLD!'
;
$bar
=
ucfirst
(
$bar
)
;
// HELLO WORLD!
echo
$bar
.
"n"
;
$bar
=
ucfirst
(
strtolower
(
$bar
)
)
;
// Hello world!
echo
$bar
.
"n"
;
?>
Date entered :
3rd Apr 2008
Rating :
No Rating
Accessed :
7405
Submitted by :
goldeekhan
Add Comment
Printer friendly
View All Comments
Email to a friend
Add to my Favourites
Download PDF version
Rating
Click each image to add
this page to each site.
Comments Available
No comment available at the moment.Be the first one to make a comment
Add Comments
Comment title :
Comment :
Enter Image Code:
Related PHP Source Codes
Spring
Wraps a string to a given number of characters using a string break character
Uppercase the first character of each word in a string
Strip whitespace (or other characters) from the beginning and end of a string
Return part of a string
Enter your search terms
Submit search form
VisualBuilder
Web
Member Panel
remember me
Forgot your password?
Resend Activation Email!
New User? Click Here!
Copyright © 2013 VisualBuilder. All rights reserved