Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Constant in PHP

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 45
    Comment on it

    Constant value cannot be changed or undefined during the execution of script. By default constant is case-sensitive.
    Constant cannot be defined by simple assignment, they may only be defined using the define() function.

    Create a PHP Constant : define() function is used to create a constant which accepts two parameters (i.e the name of the constant & its value)

    Syntax : define(name, value)

    Example:

    define() function

    <?php
    define("Title", "Welcome to My Page");
    echo Title;
    ?> 
    

 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: