Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to convert a string to uppercase and lowercase?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 101
    Comment on it

    Convert a string to uppercase:

    strtoupper() function is used to convert a string to uppercase. It convert all characters of string to uppercase.

    Syntax:

    strtoupper(string)
    

    You have to pass only one parameter to the function i.e., the string which you want to convert to uppercase.

    For example:

    <?php
    echo strtoupper("Convert this string to uppercase");
    ?>
    

    Convert a string to lowercase:

    strtolower() function is used to convert a string to lowercase. It convert all characters of string to lowercase.

    Syntax:

    strtolower(string)
    

    You have to pass only one parameter to the function i.e., the string which you want to convert to lowercase.

    For example:

    <?php
    echo strtolower("CONVERT THE STRING TO LOWERCASE");
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: