A constant is just like a variable (it holds a value) but, unlike a variable, you cannot change the value of a constant.
PHP ConstantsIn PHP, you declare constants using the define keyword: define("CONST_NAME", "Value");
Constants in PHP are case sensitive. A common standard in PHP is to use all-uppercase letters, with underscores to separate words within the name.
Syntax Example: define('FULL_NAME', 'Mike Prestwood'); define("AGE", 25); echo "Your name is " . FULL_NAME . "."; echo "You are " . AGE . ".";
More Info
0 Comments.
Would you like to comment? Reply? Ask a question? Say thanks?
| KB Article #102185 Counter |
| 168 |
|
Since 7/15/2010
|
|
|
|