Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- PHP: make a string title case in PHP
Date:
2010mar28
Language:
php
Q.
PHP: 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.