Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use define() function php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 300
    Comment on it

    What is define() function ?

    The define() function basically use for creating a constant.

    It depends on 3 parameters:

    1-name-> this is the name of the constant.

    2-value->value of the constant.

    3-case_insensitive-> define constant name and constant name must be case-insensitive.

    You can see below example the use of define() function.

    <?php
    
    define("REGARD", "Hi joe, How are you ?.");
    
    echo REGARD;//call REGARD in case_insensitive
    
    echo Regard;//call Regard
    
    ?>
    

    output will come following:

    if you will print REGARD then,

    result will come:

    Hi joe, How are you ?.

    if you will print Regard then,

    result will come:

    Regard (means that is issue or notice)

 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: