Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- How can I make a string title case in PHP?
Date:
2010mar28
Language:
php
Q.
How can I make a string title case in PHP?
A.
Use ucwords()
$title = ucwords('hello world');
There is also
$title = ucfirst('hello world');
which just capitalizes the first letter.