How do you define a constant?

Ads
 

How do you define a constant?

How do you define a constant in php?

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.

Ads









Related Tutorials/Questions & Answers:
How do you define a constant?
Defining Class Constants in JRuby
Advertisements
How do you pass a variable by value?
How do you call a constructor for a parent class?
How do you add a numerical value to a regex
how do you parse by reference in java(with JGrasp)
How do you map Java Objects with Database tables?
how do you change the message box to a specific color
How to define variable in Velocity
When will you define a method as static?
How to define a constant variable in Java?
in an application one task has to done for every 15 minutes ? How con you do it?
how to do this?
What do you understand by JPA?
What do you mean by Deadlock?
What do you mean by Serialized?
PHP list constants
How to Define Text Field Validation iPhone
How to do url rewritting?
how to do this - JavaMail
How to Define Vector Iterator in Java Program
What do you understand by private, protected and public?
What do you understand by Domain Parking?
define a constant.
What do you understand by Hibernate in Java?
how to do gui
How do I upgrade mysql?
What do you mean by Read Uncommitted?
What do you understand by Kafka broker
how to import user-define package to applet - Applet
What do you understand by Virtual Hosting?

Ads