PHP strtoupper() function with example

PHP strtoupper() work: Here, we will find out about the strtoupper() work with an example.

PHP strtoupper() work

strtoupper() work is a string capacity it acknowledges the string and returns a capitalized string.

Syntax:

    strtoupper(string);

Example:

    Input: "This is my COMPUter!"
    Output: "THIS IS MY COMPUTER!"

PHP Code:

<?PHP
    $str = "This is my COMPUter!";
    
    echo (strtoupper($str));
?>

Output:

THIS IS MY COMPUTER!

Leave a Comment

error: Alert: Content is protected!!