How to convert a string to uppercase in PHP

Topic: PHP / MySQL« Prev|Next »

Answer: Use the PHP strtoupper() function

You can use the PHP strtoupper() function to convert a string to uppercase.

  • <?php
  • $my_str = 'The quick brown fox jumps over the lazy dog.';
  • echo strtoupper($my_str);
  • ?>

Related FAQ

Here are some more FAQ related to this topic:

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.