How do you define a constant?
Posted by Raj
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:
//define a constant
define("Test","Hello Rajesh Sharma! How are you today?");
echo constant("Test");
?>
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
how do you define a constant,
OOP interview questions and answers,
PHP,
PHP constant() Function,
PHP interview questions and answers,
PHP: Constant - Manual,
PHP: Constants,
Question
.You can leave a response, or trackback from your own site.