PHP, PHP constant() Function, PHP: Constant - Manual, PHP: Constants - Manual, PHP: define - Manual, Question, how do you define a constant
In this section, I will explain how to define a constant in PHP.


define("Test","Hello Rajesh Sharma! How are you today?");

The constant() function returns the value of a constant.
Syntax:
constant(constant);

Example:

<?php
//define a constant
define("Test","Hello Rajesh Sharma! How are you today?");


echo constant("Test");
?>