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)