Helping ordinary people create extraordinary websites!
SIGNUP
LOGIN
Home
Articles
Content Writing
Design
General
Internet Marketing
Social Media
Tools and Tips
Usability
Web Hosting Articles
Tutorials
AJAX Tutorials
ASP Tutorials
C# Tutorials
CGI and Perl Tutorials
CSS Tutorials
Flash Tutorials
HTML Tutorials
Illustrator Tutorials
Java Tutorials
JavaScript Tutorials
Linux Tutorials
Miscellaneous Tutorials
MySQL Tutorials
Photoshop Tutorials
PHP Tutorials
Python Tutorials
Wireless Tutorials
WordPress Tutorials
XML Tutorials
Scripts
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted
Tools and Utilities
XML Scripts
Answers
Online Services
Tools
Get Answers
»
Computer Programming Help
»
PHP Help
How to Convert to Lowercase and Uppercase in PHP
Monday, 30th August 2010
by
Guest
I am using PHP for my first scripting language and am just becoming somewhat familiar with it. I would like to be able to maneuver between uppercase and lowercase at will with PHP. Can you please let me know how?
Ask a Question
Save
Watch
Tags:
php lowercase
,
php uppercase
Vader
Hi,
To use PHP to convert all letters in a string to uppercase you use the following:
$string = strtoupper($string);
To convert a string to lowercase you use the following PHP code:
$string = strtolower($string);
Now if you are looking to make the first character in a string uppercase:
$string = ucfirst($string);
And if you want to make the first character in each word of the string uppercase:
$string = ucwords($string);
- Vader
Monday, 30th August 2010
Votes:
17
14
mayur007
Use strtolower() and strtouppor() function
Sources:
Http://bit.ly/9BtzsI
Saturday, 30th April 2011
Votes:
6
10
More PHP Help:
»
What is Polymorphism in PHP?
»
How to count all listings in a Category in PHP?
»
Which script can I use for restoring my MySQL database?
»
Inserting An Array Into A Database
»
How to create a timer using PHP?
»
How to setup user level menu access management?
»
How to get the ID of a record just inserted into a table in PHP?
»
How do I build a multi-step autoresponder?
SPREAD THE WORD!
Tweet
GET OUR NEWS
Online Services
Domain Names
Hard Drive Recovery
Internet Marketing
Online Backup
Online Training
Payment Processing
SaaS
Software Escrow
Web Design
Web Development
Web Hosting Directory
Developer Resources
Tutorial Directory
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
White Papers