SL8R.co.uk - Code Zone

Code, Code and Code

SL8R.co.uk - Code Zone header image 2

PHP: Defining Constants

April 23rd, 2008 · 1 Comment

To define a constant, use the format:

define(constant_name,constant_value,case_insensitive)

e.g.

define(”MYCONSTANT”,”This is the value of the constant”,false);
print “Constant is ” . constant(”MYCONSTANT”);
?>

Tags: Code

1 response so far ↓

Leave a Comment