How do you define a constant?

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.









Related Tutorials/Questions & Answers:
How do you define a constant?
How do you do data mining projects?
Advertisements
How do you sum a dictionary
ModuleNotFoundError: No module named 'constant2'
ModuleNotFoundError: No module named 'constant2'
How do you call a constructor for a parent class?
How do you pass a variable by value?
Defining Class Constants in JRuby
How do you add a numerical value to a regex
how do you parse by reference in java(with JGrasp)
How do you master python in a month?
How do you get the size of an array in Python
Are you a self-made data scientist? How did you do it?
When will you define a method as static?
How do you map Java Objects with Database tables?
How to define a constant variable in Java?
how do you change the message box to a specific color
How do you combine two dictionary values for common keys
How do you make a Jarvis like AI in Python?
How to define variable in Velocity
how to define variable in node js
how to define variable in node js
What do you mean by Deadlock?
What do you understand by JPA?
in an application one task has to done for every 15 minutes ? How con you do it?
how to do this?
What do you mean by Serialized?
What do you learn in AI?
Do you need math for AI?
define a constant.
define a constant in php
What do you mean by docker container
What do you understand by private, protected and public?
How to Define Text Field Validation iPhone
How to Define Vector Iterator in Java Program
ModuleNotFoundError: No module named 'constants'
ModuleNotFoundError: No module named 'constants'
How to do url rewritting?
What do you understand by Domain Parking?
What do you understand by Kafka broker
What do you mean by Read Uncommitted?
What do you understand by Hibernate in Java?
What courses do you take for data science?
What do you understand by Virtual Hosting?
What do you mean by Read Committed?
What do you mean by Repeatable Read?
What skills do you need for big data?
Do you have to be smart to be a data scientist?
What do you mean by platform independence?
how to import user-define package to applet - Applet

Ads