·  PHP – Syntax – Keywords – define

 

- Info:

  - Keyword define defines a named constant.

 

- Example:

 

    Test.php

    <?php

   

      define("CONSTANT", "Hello world.");

      echo CONSTANT; // outputs "Hello world."

      echo Constant; // outputs "Constant" and issues a notice.

   

      define("GREETING", "Hello you.", true);

      echo GREETING; // outputs "Hello you."

      echo Greeting; // outputs "Hello you."

   

    ?>