Q:

How to convert a string to uppercase in PHP

0

How to convert a string to uppercase in PHP

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Use the PHP strtoupper() function

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

Let's try out the following example to understand how this function basically works:

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

PHP  and MySQL Frequently Asked Questions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
How to convert the first letter of a string to upp... >>
<< How to convert a string to lowercase in PHP...