PHP Questions Home

Categories

Arrays
Files
Forms
Functions
Images
MySQL
Numbers
Others
Strings
Website


PHP Functions

PHP Functions


More PHP

Top Questions
Ask a Question

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?



More strings PHP Questions

How do I count how many times each character occurs in a string?
How do I make the first letter of a string uppercase?
How do I convert relevant characters in a string to HTML entities?
How do I calculate the metaphone of a string?
How do I count the number of words in my text?