brijesh
How do you define a constant?
1 Answer(s)      4 years and 6 months ago
Posted in : PHP

How do you define a constant in php?

Advertisement
View Answers

November 13, 2010 at 4:16 PM


Hi,

define("Name", "Deepak");

echo Name;  // Outputs Deepak


define("Name", "Ravi");

echo Name;  // Outputs Deepak

Means once you declair the define a constant value that will become every time it will not take new value or it will not redeclair.if you want change in value then declair the variables for that purpose.