Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Uppercase..

Status
Not open for further replies.

rjonesX

Technical User
Joined
Jun 18, 2001
Messages
56
Location
US
In Perl you can force the next letter to be printed uppercase in a string using the \u command. Any idea if this can be accomplished in PHP?
 
That obscure functionality of the print statement is not implemented in PHP.

PHP does, however, have a wealth of fuctions for making all or part of a string uppercase: strtoupper(), ucfirst() and ucwords().

For the only possible use I can imagine for the "\u" operator, ucfirst() might be the first function to look at.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
PERFECT!

This is very useful for working with xml and using node names in lowercase but wanting them to print out with the correct capitalization.

Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top