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
    • 110
    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:

    1. 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:

    1. <?php
    2. echo strtoupper("Convert this string to uppercase");
    3. ?>

    Convert a string to lowercase:

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

    Syntax:

    1. 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:

    1. <?php
    2. echo strtolower("CONVERT THE STRING TO LOWERCASE");
    3. ?>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: