How can i do to declarate a constant into a class?????
Have I to declarate it like a class variable???
Thanks.
Constants can be used anywhere in your script.
Example:
define("CONSTANT", "this is my constant");
class Test {
function testfunction() { echo CONSTANT; }
}
this will print:
this is my constant