Thursday, April 1, 2010

How to define a constant in php

To define a constant we need to usedefine

Example

define("CONSTANT", "PHP interview questions and answers collection");
echo
CONSTANT; // outputs "PHP interview questions and answers collection"


No comments:

Post a Comment