Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
ucwords.php : ucwords « String « PHP
PHP
String
ucwords
ucwords.php
<?php $title =
"asdf asdf asdf!"
; echo ucwords($title); ?>
Related examples in the same category
1.
Controlling Case
2.
ucwords() function capitalizes the first letter of each word in a string.
3.
ucwords() makes the first letter of every word in a string uppercase.
4.
string ucwords ( string str ) converts the first letter of each word in the string to an uppercase character, leaving the others untouched.
5.
submitted string lowercase with strtolower() before invoking ucwords():
6.
Prettifying names with ucwords()