PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I make the contents of a string upper case?


If you want to make the whole contents of a string upper case, then just use the opposite of strtolower, which funnily enough is called strtoupper.

Here's the function in action:

<?php
$mystring 
"can anybody hear me?";
echo 
strtoupper($mystring);
?>


Prints: CAN ANYBODY HEAR ME?



Comment on this Question and Answer >>>

ASK A QUESTION

More strings PHP Questions

How can I remove trailing space from a string?

How do you hash the password in this php script: define(sb db user name, admin store); define(sb db password, mypassword);

How do I print text to the screen?

How do I remove trailing whitespace?

How do I check if a string contains HTML?



Custom Search