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?
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
Defining Class Constants in JRuby
Are you a self-made data scientist? How did you do it?
How do you map Java Objects with Database tables?
When will you define a method as static?
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
how to do this?
in an application one task has to done for every 15 minutes ? How con you do it?
What do you mean by Deadlock?
What do you understand by JPA?
What do you mean by Serialized?
What do you learn in AI?
Do you need math for AI?
define a constant.
How to Define Text Field Validation iPhone
define a constant in php
How to Define Vector Iterator in Java Program
How to do url rewritting?
What do you mean by docker container
What do you understand by private, protected and public?
how to do this - JavaMail
How many hours a day/a week do you work?
how to import user-define package to applet - Applet
ModuleNotFoundError: No module named 'constants'
ModuleNotFoundError: No module named 'constants'
how to do gui
What do you understand by Domain Parking?
What do you mean by Read Uncommitted?
What do you understand by Kafka broker
What do you understand by Hibernate in Java?
How do I upgrade mysql?
What courses do you take for data science?
What do you understand by Virtual Hosting?
What do you mean by Read Committed?

Ads